/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/

/*
This is an optimized version of Dojo, built for deployment and not for
development. To get sources and documentation, please visit:

http://dojotoolkit.org
*/

//>>built
require({cache: {"dojox/app/main": function() {
define("dojox/app/main", ["dojo/_base/kernel", "require", "dojo/_base/lang", "dojo/_base/declare", "dojo/Deferred", "dojo/when", "dojo/has", "dojo/_base/config", "dojo/on", "dojo/ready", "dojo/_base/window", "dojo/dom-construct", "./model", "./View", "./controllers/Load", "./controllers/Transition", "./controllers/Layout"], function(_1, _2, _3, _4, _5, _6, _7, _8, on, _9, _a, _b, _c, _d, _e, _f, _10) {
_1.experimental("dojox.app");
_7.add("app-log-api", (_8["app"] || {}).debugApp);
var _11 = _4(null, {constructor: function(_12, _13) {
_3.mixin(this, _12);
this.params = _12;
this.id = _12.id;
this.defaultView = _12.defaultView;
this.widgetId = _12.id;
this.controllers = [];
this.children = {};
this.loadedModels = {};
this.domNode = _b.create("div", {id: this.id + "_Root",style: "width:100%; height:100%; overflow-y:hidden; overflow-x:hidden;"});
_13.appendChild(this.domNode);
},createDataStore: function(_14) {
if (_14.stores) {
for (var _15 in _14.stores) {
if (_15.charAt(0) !== "_") {
var _16 = _14.stores[_15].type ? _14.stores[_15].type : "dojo/store/Memory";
var _17 = {};
if (_14.stores[_15].params) {
_3.mixin(_17, _14.stores[_15].params);
}
var _18 = _2(_16);
if (_17.data && _3.isString(_17.data)) {
_17.data = _3.getObject(_17.data);
}
_14.stores[_15].store = new _18(_17);
}
}
}
},createControllers: function(_19) {
if (_19) {
var _1a = [];
for (var i = 0; i < _19.length; i++) {
_1a.push(_19[i]);
}
var def = new _5();
var _1b;
try {
_1b = _2.on("error", function(_1c) {
if (def.isResolved() || def.isRejected()) {
return;
}
def.reject("load controllers error.");
_1b.remove();
});
_2(_1a, function() {
def.resolve.call(def, arguments);
_1b.remove();
});
} catch (ex) {
def.reject("load controllers error.");
_1b.remove();
}
var _1d = new _5();
_6(def, _3.hitch(this, function() {
for (var i = 0; i < arguments[0].length; i++) {
this.controllers.push(new arguments[0][i](this));
}
_1d.resolve(this);
}), function() {
_1d.reject("load controllers error.");
});
return _1d;
}
},trigger: function(_1e, _1f) {
on.emit(this.domNode, _1e, _1f);
},start: function() {
this.createDataStore(this.params);
var _20 = new _5();
var _21;
try {
_21 = _c(this.params.models, this);
} catch (ex) {
_20.reject("load model error.");
return _20.promise;
}
if (_21.then) {
_6(_21, _3.hitch(this, function(_22) {
this.loadedModels = _22;
this.setupAppView();
}), function() {
_20.reject("load model error.");
});
} else {
this.loadedModels = _21;
this.setupAppView();
}
},setupAppView: function() {
if (this.template) {
this.view = new _d({app: this,name: this.name,parent: this,templateString: this.templateString,definition: this.definition});
_6(this.view.start(), _3.hitch(this, function() {
this.domNode = this.view.domNode;
this.setupControllers();
this.startup();
}));
} else {
this.setupControllers();
this.startup();
}
},getParamsFromHash: function(_23) {
var _24 = {};
if (_23 && _23.length) {
for (var _25 = _23.split("&"), x = 0; x < _25.length; x++) {
var tp = _25[x].split("="), _26 = tp[0], _27 = encodeURIComponent(tp[1] || "");
if (_26 && _27) {
_24[_26] = _27;
}
}
}
return _24;
},setupControllers: function() {
if (!this.noAutoLoadControllers) {
this.controllers.push(new _e(this));
this.controllers.push(new _f(this));
this.controllers.push(new _10(this));
}
var _28 = window.location.hash;
this._startView = (((_28 && _28.charAt(0) == "#") ? _28.substr(1) : _28) || this.defaultView).split("&")[0];
this._startParams = this.getParamsFromHash(_28) || this.defaultParams || {};
},startup: function() {
var _29 = this.createControllers(this.params.controllers);
_6(_29, _3.hitch(this, function(_2a) {
this.trigger("load", {"viewId": this.defaultView,"params": this._startParams,"callback": _3.hitch(this, function() {
var _2b = this.defaultView.split(",");
_2b = _2b.shift();
this.selectedChild = this.children[this.id + "_" + _2b];
this.trigger("transition", {"viewId": this._startView,"params": this._startParams});
this.setStatus(this.lifecycle.STARTED);
})});
}));
}});
function _2c(_2d, _2e, _2f, _30) {
var _31;
if (!_2d.loaderConfig) {
_2d.loaderConfig = {};
}
if (!_2d.loaderConfig.paths) {
_2d.loaderConfig.paths = {};
}
if (!_2d.loaderConfig.paths["app"]) {
_31 = window.location.pathname;
if (_31.charAt(_31.length) != "/") {
_31 = _31.split("/");
_31.pop();
_31 = _31.join("/");
}
_2d.loaderConfig.paths["app"] = _31;
}
_2(_2d.loaderConfig);
if (!_2d.modules) {
_2d.modules = [];
}
_2d.modules.push("dojox/app/module/lifecycle");
var _32 = _2d.modules.concat(_2d.dependencies);
if (_2d.template) {
_31 = _2d.template;
if (_31.indexOf("./") == 0) {
_31 = "app/" + _31;
}
_32.push("dojo/text!" + _31);
}
_2(_32, function() {
var _33 = [_11];
for (var i = 0; i < _2d.modules.length; i++) {
_33.push(arguments[i]);
}
if (_2d.template) {
var ext = {templateString: arguments[arguments.length - 1]};
}
App = _4(_33, ext);
_9(function() {
var app = new App(_2d, _2e || _a.body());
if (_7("app-log-api")) {
app.log = function() {
var msg = "";
try {
for (var i = 0; i < arguments.length - 1; i++) {
msg = msg + arguments[i];
}
} catch (e) {
}
};
} else {
app.log = function() {
};
}
app.setStatus(app.lifecycle.STARTING);
var _34 = app.id;
if (window[_34]) {
_3.mixin(app, window[_34]);
}
window[_34] = app;
app.start();
});
});
}
;
return function(_35, _36) {
if (!_35) {
throw Error("App Config Missing");
}
if (_35.validate) {
_2(["dojox/json/schema", "dojox/json/ref", "dojo/text!dojox/application/schema/application.json"], function(_37, _38) {
_37 = dojox.json.ref.resolveJson(_37);
if (_37.validate(_35, _38)) {
_2c(_35, _36);
}
});
} else {
_2c(_35, _36);
}
};
});
},"dojox/app/model": function() {
define("dojox/app/model", ["dojo/_base/lang", "dojo/Deferred", "dojo/when"], function(_39, _3a, _3b) {
return function(_3c, _3d, app) {
this.app = app || _3d;
this.defCount = 0;
var _3e = {};
var _3f = new _3a();
if (_3d.loadedModels) {
_39.mixin(_3e, _3d.loadedModels);
}
if (_3c) {
for (var _40 in _3c) {
if (_40.charAt(0) !== "_") {
this.defCount++;
}
}
if (this.defCount == 0) {
return _3e;
}
for (var _41 in _3c) {
if (_41.charAt(0) !== "_") {
_42(_3c, _41, _3d, _3f, _3e);
}
}
return _3f;
} else {
return _3e;
}
};
function _42(_43, _44, _45, _46, _47) {
var _48 = _43[_44].params ? _43[_44].params : {};
var def = new _3a();
var _49 = _43[_44].modelLoader ? _43[_44].modelLoader : "dojox/app/utils/simpleModel";
require([_49], function(_4a) {
def.resolve(_4a);
});
var _4b = new _3a();
return _3b(def, _39.hitch(this, function(_4c) {
var _4d;
try {
_4d = _4c(_43, _48, _44);
} catch (ex) {
console.warn("load model error in model.", ex);
_4b.reject("load model error in model.", ex);
return _4b.promise;
}
if (_4d.then) {
_3b(_4d, _39.hitch(this, function(_4e) {
_47[_44] = _4e;
this.app.log("in app/model, for item=[", _44, "] loadedModels =", _47);
this.defCount--;
if (this.defCount == 0) {
_46.resolve(_47);
}
_4b.resolve(_47);
return _47;
}), function() {
_4b.reject("load model error in models.");
});
return _4b;
} else {
_47[_44] = _4d;
this.app.log("in app/model else path, for item=[", _44, "] loadedModels=", _47);
this.defCount--;
if (this.defCount == 0) {
_46.resolve(_47);
}
_4b.resolve(_47);
return _47;
}
}));
}
;
});
},"dojox/app/View": function() {
define("dojox/app/View", ["dojo/_base/declare", "dojo/_base/lang", "dojo/Deferred", "dojo/when", "require", "dojo/dom-attr", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", "./model"], function(_4f, _50, _51, _52, _53, _54, _55, _56, _57) {
return _4f("dojox.app.View", null, {constructor: function(_58) {
this.id = "";
this.name = "";
this.templateString = "";
this.template = "";
this.definition = "";
this.parent = null;
this.children = {};
this.selectedChild = null;
this._started = false;
this._definition = null;
_50.mixin(this, _58);
if (this.parent.views) {
_50.mixin(this, this.parent.views[this.name]);
}
},_loadViewDefinition: function() {
var _59 = new _51();
var _5a;
if (this.definition && (this.definition === "none")) {
_59.resolve(true);
return _59;
} else {
if (this.definition) {
_5a = this.definition.replace(/(\.js)$/, "");
} else {
_5a = this.id.split("_");
_5a.shift();
_5a = _5a.join("/");
_5a = "./views/" + _5a;
}
}
var _5b;
try {
var _5c = _5a;
var _5d = _5c.indexOf("./");
if (_5d >= 0) {
_5c = _5a.substring(_5d + 2);
}
_5b = _53.on("error", function(_5e) {
if (_59.isResolved() || _59.isRejected()) {
return;
}
if (_5e.info[0] && (_5e.info[0].indexOf(_5c) >= 0)) {
_59.resolve(false);
_5b.remove();
}
});
if (_5a.indexOf("./") == 0) {
_5a = "app/" + _5a;
}
_53([_5a], function(_5f) {
_59.resolve(_5f);
_5b.remove();
});
} catch (ex) {
_59.resolve(false);
_5b.remove();
}
return _59;
},_loadViewTemplate: function() {
if (this.templateString) {
return true;
} else {
if (!this.dependencies) {
this.dependencies = [];
}
var tpl = this.template;
if (tpl.indexOf("./") == 0) {
tpl = "app/" + tpl;
}
var _60 = this.template ? this.dependencies.concat(["dojo/text!" + tpl]) : this.dependencies.concat([]);
var def = new _51();
if (_60.length > 0) {
var _61;
try {
_61 = _53.on("error", _50.hitch(this, function(_62) {
if (def.isResolved() || def.isRejected()) {
return;
}
if (_62.info[0] && _62.info[0].indexOf(this.template) >= 0) {
def.resolve(false);
_61.remove();
}
}));
_53(_60, function() {
def.resolve.call(def, arguments);
_61.remove();
});
} catch (ex) {
def.resolve(false);
_61.remove();
}
} else {
def.resolve(true);
}
var _63 = new _51();
_52(def, _50.hitch(this, function() {
this.templateString = this.template ? arguments[0][arguments[0].length - 1] : "
<div></div>";
_63.resolve(this);
}));
return _63;
}
},start: function() {
if (this._started) {
return this;
}
var _64 = this._loadViewDefinition();
var _65 = this._loadViewTemplate();
this._startDef = new _51();
_52(_64, _50.hitch(this, function(_66) {
this._definition = _66;
_52(_65, _50.hitch(this, function() {
this._setupModel();
}));
}));
return this._startDef;
},_setupModel: function() {
if (!this.loadedModels) {
var _67 = new _51();
var _68;
try {
_68 = _57(this.models, this.parent, this.app);
} catch (ex) {
_67.reject("load model error.");
return _67.promise;
}
if (_68.then) {
_52(_68, _50.hitch(this, function(_69) {
if (_69) {
this.loadedModels = _69;
}
this._startup();
}), function() {
_67.reject("load model error.");
});
} else {
this.loadedModels = _68;
this._startup();
}
} else {
this._startup();
}
},_startup: function() {
this._widget = this.render(this.templateString);
this.domNode = this._widget.domNode;
this.parent.domNode.appendChild(this.domNode);
this._widget.startup();
_54.set(this.domNode, "id", this.id);
_54.set(this.domNode, "data-app-region", "center");
_54.set(this.domNode, "style", "width:100%; height:100%");
this._widget.region = "center";
if (this._definition) {
_50.mixin(this, this._definition);
}
this.app.log("  > in app/View calling init() name=[", this.name, "], parent.name=[", this.parent.name, "]");
this.init();
this._started = true;
if (this._startDef) {
this._startDef.resolve(this);
}
},render: function(_6a) {
var _6b = new _55();
var _6c = new _56();
if (this.loadedModels) {
_6c.loadedModels = this.loadedModels;
}
_50.mixin(_6b, _6c);
_6b.templateString = _6a;
_6b.buildRendering();
return _6b;
},init: function() {
},beforeActivate: function() {
},afterActivate: function() {
},beforeDeactivate: function() {
},afterDeactivate: function() {
},destroy: function() {
}});
});
},"dijit/_TemplatedMixin": function() {
define("dijit/_TemplatedMixin", ["dojo/_base/lang", "dojo/touch", "./_WidgetBase", "dojo/string", "dojo/cache", "dojo/_base/array", "dojo/_base/declare", "dojo/dom-construct", "dojo/sniff", "dojo/_base/unload"], function(_6d, _6e, _6f, _70, _71, _72, _73, _74, has, _75) {
var _76 = _73("dijit._TemplatedMixin", null, {templateString: null,templatePath: null,_skipNodeCache: false,_earlyTemplatedStartup: false,constructor: function() {
this._attachPoints = [];
this._attachEvents = [];
},_stringRepl: function(_77) {
var _78 = this.declaredClass, _79 = this;
return _70.substitute(_77, this, function(_7a, key) {
if (key.charAt(0) == "!") {
_7a = _6d.getObject(key.substr(1), false, _79);
}
if (typeof _7a == "undefined") {
throw new Error(_78 + " template:" + key);
}
if (_7a == null) {
return "";
}
return key.charAt(0) == "!" ? _7a : _7a.toString().replace(/"/g, "&quot;");
}, this);
},buildRendering: function() {
if (!this.templateString) {
this.templateString = _71(this.templatePath, {sanitize: true});
}
var _7b = _76.getCachedTemplate(this.templateString, this._skipNodeCache, this.ownerDocument);
var _7c;
if (_6d.isString(_7b)) {
_7c = _74.toDom(this._stringRepl(_7b), this.ownerDocument);
if (_7c.nodeType != 1) {
throw new Error("Invalid template: " + _7b);
}
} else {
_7c = _7b.cloneNode(true);
}
this.domNode = _7c;
this.inherited(arguments);
this._attachTemplateNodes(_7c, function(n, p) {
return n.getAttribute(p);
});
this._beforeFillContent();
this._fillContent(this.srcNodeRef);
},_beforeFillContent: function() {
},_fillContent: function(_7d) {
var _7e = this.containerNode;
if (_7d && _7e) {
while (_7d.hasChildNodes()) {
_7e.appendChild(_7d.firstChild);
}
}
},_attachTemplateNodes: function(_7f, _80) {
var _81 = _6d.isArray(_7f) ? _7f : (_7f.all || _7f.getElementsByTagName("*"));
var x = _6d.isArray(_7f) ? 0 : -1;
for (; x < 0 || _81[x]; x++) {
var _82 = (x == -1) ? _7f : _81[x];
if (this.widgetsInTemplate && (_80(_82, "dojoType") || _80(_82, "data-dojo-type"))) {
continue;
}
var _83 = _80(_82, "dojoAttachPoint") || _80(_82, "data-dojo-attach-point");
if (_83) {
var _84, _85 = _83.split(/\s*,\s*/);
while ((_84 = _85.shift())) {
if (_6d.isArray(this[_84])) {
this[_84].push(_82);
} else {
this[_84] = _82;
}
this._attachPoints.push(_84);
}
}
var _86 = _80(_82, "dojoAttachEvent") || _80(_82, "data-dojo-attach-event");
if (_86) {
var _87, _88 = _86.split(/\s*,\s*/);
var _89 = _6d.trim;
while ((_87 = _88.shift())) {
if (_87) {
var _8a = null;
if (_87.indexOf(":") != -1) {
var _8b = _87.split(":");
_87 = _89(_8b[0]);
_8a = _89(_8b[1]);
} else {
_87 = _89(_87);
}
if (!_8a) {
_8a = _87;
}
this._attachEvents.push(this.connect(_82, _6e[_87] || _87, _8a));
}
}
}
}
},destroyRendering: function() {
_72.forEach(this._attachPoints, function(_8c) {
delete this[_8c];
}, this);
this._attachPoints = [];
_72.forEach(this._attachEvents, this.disconnect, this);
this._attachEvents = [];
this.inherited(arguments);
}});
_76._templateCache = {};
_76.getCachedTemplate = function(_8d, _8e, doc) {
var _8f = _76._templateCache;
var key = _8d;
var _90 = _8f[key];
if (_90) {
try {
if (!_90.ownerDocument || _90.ownerDocument == (doc || document)) {
return _90;
}
} catch (e) {
}
_74.destroy(_90);
}
_8d = _70.trim(_8d);
if (_8e || _8d.match(/\$\{([^\}]+)\}/g)) {
return (_8f[key] = _8d);
} else {
var _91 = _74.toDom(_8d, doc);
if (_91.nodeType != 1) {
throw new Error("Invalid template: " + _8d);
}
return (_8f[key] = _91);
}
};
if (has("ie")) {
_75.addOnWindowUnload(function() {
var _92 = _76._templateCache;
for (var key in _92) {
var _93 = _92[key];
if (typeof _93 == "object") {
_74.destroy(_93);
}
delete _92[key];
}
});
}
_6d.extend(_6f, {dojoAttachEvent: "",dojoAttachPoint: ""});
return _76;
});
},"dojo/touch": function() {
define(["./_base/kernel", "./aspect", "./dom", "./on", "./has", "./mouse", "./ready", "./_base/window"], function(_94, _95, dom, on, has, _96, _97, win) {
var _98 = has("touch");
var _99 = false;
if (has("ios")) {
var ua = navigator.userAgent;
var v = ua.match(/OS ([\d_]+)/) ? RegExp.$1 : "1";
var os = parseFloat(v.replace(/_/, ".").replace(/_/g, ""));
_99 = os < 5;
}
var _9a, _9b;
if (_98) {
_97(function() {
_9b = win.body();
win.doc.addEventListener("touchstart", function(evt) {
var _9c = _9b;
_9b = evt.target;
on.emit(_9c, "dojotouchout", {target: _9c,relatedTarget: _9b,bubbles: true});
on.emit(_9b, "dojotouchover", {target: _9b,relatedTarget: _9c,bubbles: true});
}, true);
on(win.doc, "touchmove", function(evt) {
var _9d = win.doc.elementFromPoint(evt.pageX - (_99 ? 0 : win.global.pageXOffset), evt.pageY - (_99 ? 0 : win.global.pageYOffset));
if (_9d && _9b !== _9d) {
on.emit(_9b, "dojotouchout", {target: _9b,relatedTarget: _9d,bubbles: true});
on.emit(_9d, "dojotouchover", {target: _9d,relatedTarget: _9b,bubbles: true});
_9b = _9d;
}
});
});
_9a = function(_9e, _9f) {
return on(win.doc, "touchmove", function(evt) {
if (_9e === win.doc || dom.isDescendant(_9b, _9e)) {
evt.target = _9b;
_9f.call(this, evt);
}
});
};
}
function _a0(_a1) {
return function(_a2, _a3) {
return on(_a2, _a1, _a3);
};
}
;
var _a4 = {press: _a0(_98 ? "touchstart" : "mousedown"),move: _98 ? _9a : _a0("mousemove"),release: _a0(_98 ? "touchend" : "mouseup"),cancel: _98 ? _a0("touchcancel") : _96.leave,over: _a0(_98 ? "dojotouchover" : "mouseover"),out: _a0(_98 ? "dojotouchout" : "mouseout"),enter: _96._eventHandler(_98 ? "dojotouchover" : "mouseover"),leave: _96._eventHandler(_98 ? "dojotouchout" : "mouseout")};
1 && (_94.touch = _a4);
return _a4;
});
},"dijit/_WidgetBase": function() {
define("dijit/_WidgetBase", ["require", "dojo/_base/array", "dojo/aspect", "dojo/_base/config", "dojo/_base/connect", "dojo/_base/declare", "dojo/dom", "dojo/dom-attr", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-geometry", "dojo/dom-style", "dojo/has", "dojo/_base/kernel", "dojo/_base/lang", "dojo/on", "dojo/ready", "dojo/Stateful", "dojo/topic", "dojo/_base/window", "./Destroyable", "./registry"], function(_a5, _a6, _a7, _a8, _a9, _aa, dom, _ab, _ac, _ad, _ae, _af, has, _b0, _b1, on, _b2, _b3, _b4, win, _b5, _b6) {
has.add("dijit-legacy-requires", !_b0.isAsync);
if (has("dijit-legacy-requires")) {
_b2(0, function() {
var _b7 = ["dijit/_base/manager"];
_a5(_b7);
});
}
var _b8 = {};
function _b9(obj) {
var ret = {};
for (var _ba in obj) {
ret[_ba.toLowerCase()] = true;
}
return ret;
}
;
function _bb(_bc) {
return function(val) {
_ab[val ? "set" : "remove"](this.domNode, _bc, val);
this._set(_bc, val);
};
}
;
return _aa("dijit._WidgetBase", [_b3, _b5], {id: "",_setIdAttr: "domNode",lang: "",_setLangAttr: _bb("lang"),dir: "",_setDirAttr: _bb("dir"),textDir: "","class": "",_setClassAttr: {node: "domNode",type: "class"},style: "",title: "",tooltip: "",baseClass: "",srcNodeRef: null,domNode: null,containerNode: null,ownerDocument: null,_setOwnerDocumentAttr: function(val) {
this._set("ownerDocument", val);
},attributeMap: {},_blankGif: _a8.blankGif || _a5.toUrl("dojo/resources/blank.gif"),postscript: function(_bd, _be) {
this.create(_bd, _be);
},create: function(_bf, _c0) {
this.srcNodeRef = dom.byId(_c0);
this._connects = [];
this._supportingWidgets = [];
if (this.srcNodeRef && (typeof this.srcNodeRef.id == "string")) {
this.id = this.srcNodeRef.id;
}
if (_bf) {
this.params = _bf;
_b1.mixin(this, _bf);
}
this.postMixInProperties();
if (!this.id) {
this.id = _b6.getUniqueId(this.declaredClass.replace(/\./g, "_"));
if (this.params) {
delete this.params.id;
}
}
this.ownerDocument = this.ownerDocument || (this.srcNodeRef ? this.srcNodeRef.ownerDocument : win.doc);
this.ownerDocumentBody = win.body(this.ownerDocument);
_b6.add(this);
this.buildRendering();
var _c1;
if (this.domNode) {
this._applyAttributes();
var _c2 = this.srcNodeRef;
if (_c2 && _c2.parentNode && this.domNode !== _c2) {
_c2.parentNode.replaceChild(this.domNode, _c2);
_c1 = true;
}
this.domNode.setAttribute("widgetId", this.id);
}
this.postCreate();
if (_c1) {
delete this.srcNodeRef;
}
this._created = true;
},_applyAttributes: function() {
var _c3 = this.constructor, _c4 = _c3._setterAttrs;
if (!_c4) {
_c4 = (_c3._setterAttrs = []);
for (var _c5 in this.attributeMap) {
_c4.push(_c5);
}
var _c6 = _c3.prototype;
for (var _c7 in _c6) {
if (_c7 in this.attributeMap) {
continue;
}
var _c8 = "_set" + _c7.replace(/^[a-z]|-[a-zA-Z]/g, function(c) {
return c.charAt(c.length - 1).toUpperCase();
}) + "Attr";
if (_c8 in _c6) {
_c4.push(_c7);
}
}
}
var _c9 = {};
for (var key in this.params || {}) {
_c9[key] = this[key];
}
_a6.forEach(_c4, function(_ca) {
if (_ca in _c9) {
} else {
if (this[_ca]) {
this.set(_ca, this[_ca]);
}
}
}, this);
for (key in _c9) {
this.set(key, _c9[key]);
}
},postMixInProperties: function() {
},buildRendering: function() {
if (!this.domNode) {
this.domNode = this.srcNodeRef || this.ownerDocument.createElement("div");
}
if (this.baseClass) {
var _cb = this.baseClass.split(" ");
if (!this.isLeftToRight()) {
_cb = _cb.concat(_a6.map(_cb, function(_cc) {
return _cc + "Rtl";
}));
}
_ac.add(this.domNode, _cb);
}
},postCreate: function() {
},startup: function() {
if (this._started) {
return;
}
this._started = true;
_a6.forEach(this.getChildren(), function(obj) {
if (!obj._started && !obj._destroyed && _b1.isFunction(obj.startup)) {
obj.startup();
obj._started = true;
}
});
},destroyRecursive: function(_cd) {
this._beingDestroyed = true;
this.destroyDescendants(_cd);
this.destroy(_cd);
},destroy: function(_ce) {
this._beingDestroyed = true;
this.uninitialize();
function _cf(w) {
if (w.destroyRecursive) {
w.destroyRecursive(_ce);
} else {
if (w.destroy) {
w.destroy(_ce);
}
}
}
;
_a6.forEach(this._connects, _b1.hitch(this, "disconnect"));
_a6.forEach(this._supportingWidgets, _cf);
if (this.domNode) {
_a6.forEach(_b6.findWidgets(this.domNode, this.containerNode), _cf);
}
this.destroyRendering(_ce);
_b6.remove(this.id);
this._destroyed = true;
},destroyRendering: function(_d0) {
if (this.bgIframe) {
this.bgIframe.destroy(_d0);
delete this.bgIframe;
}
if (this.domNode) {
if (_d0) {
_ab.remove(this.domNode, "widgetId");
} else {
_ad.destroy(this.domNode);
}
delete this.domNode;
}
if (this.srcNodeRef) {
if (!_d0) {
_ad.destroy(this.srcNodeRef);
}
delete this.srcNodeRef;
}
},destroyDescendants: function(_d1) {
_a6.forEach(this.getChildren(), function(_d2) {
if (_d2.destroyRecursive) {
_d2.destroyRecursive(_d1);
}
});
},uninitialize: function() {
return false;
},_setStyleAttr: function(_d3) {
var _d4 = this.domNode;
if (_b1.isObject(_d3)) {
_af.set(_d4, _d3);
} else {
if (_d4.style.cssText) {
_d4.style.cssText += "; " + _d3;
} else {
_d4.style.cssText = _d3;
}
}
this._set("style", _d3);
},_attrToDom: function(_d5, _d6, _d7) {
_d7 = arguments.length >= 3 ? _d7 : this.attributeMap[_d5];
_a6.forEach(_b1.isArray(_d7) ? _d7 : [_d7], function(_d8) {
var _d9 = this[_d8.node || _d8 || "domNode"];
var _da = _d8.type || "attribute";
switch (_da) {
case "attribute":
if (_b1.isFunction(_d6)) {
_d6 = _b1.hitch(this, _d6);
}
var _db = _d8.attribute ? _d8.attribute : (/^on[A-Z][a-zA-Z]*$/.test(_d5) ? _d5.toLowerCase() : _d5);
if (_d9.tagName) {
_ab.set(_d9, _db, _d6);
} else {
_d9.set(_db, _d6);
}
break;
case "innerText":
_d9.innerHTML = "";
_d9.appendChild(this.ownerDocument.createTextNode(_d6));
break;
case "innerHTML":
_d9.innerHTML = _d6;
break;
case "class":
_ac.replace(_d9, _d6, this[_d5]);
break;
}
}, this);
},get: function(_dc) {
var _dd = this._getAttrNames(_dc);
return this[_dd.g] ? this[_dd.g]() : this[_dc];
},set: function(_de, _df) {
if (typeof _de === "object") {
for (var x in _de) {
this.set(x, _de[x]);
}
return this;
}
var _e0 = this._getAttrNames(_de), _e1 = this[_e0.s];
if (_b1.isFunction(_e1)) {
var _e2 = _e1.apply(this, Array.prototype.slice.call(arguments, 1));
} else {
var _e3 = this.focusNode && !_b1.isFunction(this.focusNode) ? "focusNode" : "domNode", tag = this[_e3].tagName, _e4 = _b8[tag] || (_b8[tag] = _b9(this[_e3])), map = _de in this.attributeMap ? this.attributeMap[_de] : _e0.s in this ? this[_e0.s] : ((_e0.l in _e4 && typeof _df != "function") || /^aria-|^data-|^role$/.test(_de)) ? _e3 : null;
if (map != null) {
this._attrToDom(_de, _df, map);
}
this._set(_de, _df);
}
return _e2 || this;
},_attrPairNames: {},_getAttrNames: function(_e5) {
var apn = this._attrPairNames;
if (apn[_e5]) {
return apn[_e5];
}
var uc = _e5.replace(/^[a-z]|-[a-zA-Z]/g, function(c) {
return c.charAt(c.length - 1).toUpperCase();
});
return (apn[_e5] = {n: _e5 + "Node",s: "_set" + uc + "Attr",g: "_get" + uc + "Attr",l: uc.toLowerCase()});
},_set: function(_e6, _e7) {
var _e8 = this[_e6];
this[_e6] = _e7;
if (this._created && _e7 !== _e8) {
if (this._watchCallbacks) {
this._watchCallbacks(_e6, _e8, _e7);
}
this.emit("attrmodified-" + _e6, {detail: {prevValue: _e8,newValue: _e7}});
}
},emit: function(_e9, _ea, _eb) {
_ea = _ea || {};
if (_ea.bubbles === undefined) {
_ea.bubbles = true;
}
if (_ea.cancelable === undefined) {
_ea.cancelable = true;
}
if (!_ea.detail) {
_ea.detail = {};
}
_ea.detail.widget = this;
var ret, _ec = this["on" + _e9];
if (_ec) {
ret = _ec.apply(this, _eb ? _eb : [_ea]);
}
if (this._started && !this._beingDestroyed) {
on.emit(this.domNode, _e9.toLowerCase(), _ea);
}
return ret;
},on: function(_ed, _ee) {
var _ef = this._onMap(_ed);
if (_ef) {
return _a7.after(this, _ef, _ee, true);
}
return this.own(on(this.domNode, _ed, _ee))[0];
},_onMap: function(_f0) {
var _f1 = this.constructor, map = _f1._onMap;
if (!map) {
map = (_f1._onMap = {});
for (var _f2 in _f1.prototype) {
if (/^on/.test(_f2)) {
map[_f2.replace(/^on/, "").toLowerCase()] = _f2;
}
}
}
return map[typeof _f0 == "string" && _f0.toLowerCase()];
},toString: function() {
return "[Widget " + this.declaredClass + ", " + (this.id || "NO ID") + "]";
},getChildren: function() {
return this.containerNode ? _b6.findWidgets(this.containerNode) : [];
},getParent: function() {
return _b6.getEnclosingWidget(this.domNode.parentNode);
},connect: function(obj, _f3, _f4) {
return this.own(_a9.connect(obj, _f3, this, _f4))[0];
},disconnect: function(_f5) {
_f5.remove();
},subscribe: function(t, _f6) {
return this.own(_b4.subscribe(t, _b1.hitch(this, _f6)))[0];
},unsubscribe: function(_f7) {
_f7.remove();
},isLeftToRight: function() {
return this.dir ? (this.dir == "ltr") : _ae.isBodyLtr(this.ownerDocument);
},isFocusable: function() {
return this.focus && (_af.get(this.domNode, "display") != "none");
},placeAt: function(_f8, _f9) {
var _fa = !_f8.tagName && _b6.byId(_f8);
if (_fa && _fa.addChild && (!_f9 || typeof _f9 === "number")) {
_fa.addChild(this, _f9);
} else {
var ref = _fa ? (_fa.containerNode && !/after|before|replace/.test(_f9 || "") ? _fa.containerNode : _fa.domNode) : dom.byId(_f8, this.ownerDocument);
_ad.place(this.domNode, ref, _f9);
if (!this._started && (this.getParent() || {})._started) {
this.startup();
}
}
return this;
},getTextDir: function(_fb, _fc) {
return _fc;
},applyTextDir: function() {
},defer: function(fcn, _fd) {
var _fe = setTimeout(_b1.hitch(this, function() {
_fe = null;
if (!this._destroyed) {
_b1.hitch(this, fcn)();
}
}), _fd || 0);
return {remove: function() {
if (_fe) {
clearTimeout(_fe);
_fe = null;
}
return null;
}};
}});
});
},"dojo/Stateful": function() {
define(["./_base/declare", "./_base/lang", "./_base/array", "dojo/when"], function(_ff, lang, _100, when) {
return _ff("dojo.Stateful", null, {_attrPairNames: {},_getAttrNames: function(name) {
var apn = this._attrPairNames;
if (apn[name]) {
return apn[name];
}
return (apn[name] = {s: "_" + name + "Setter",g: "_" + name + "Getter"});
},postscript: function(_101) {
if (_101) {
this.set(_101);
}
},_get: function(name, _102) {
return typeof this[_102.g] === "function" ? this[_102.g]() : this[name];
},get: function(name) {
return this._get(name, this._getAttrNames(name));
},set: function(name, _103) {
if (typeof name === "object") {
for (var x in name) {
if (name.hasOwnProperty(x) && x != "_watchCallbacks") {
this.set(x, name[x]);
}
}
return this;
}
var _104 = this._getAttrNames(name), _105 = this._get(name, _104), _106 = this[_104.s], _107;
if (typeof _106 === "function") {
_107 = _106.apply(this, Array.prototype.slice.call(arguments, 1));
} else {
this[name] = _103;
}
if (this._watchCallbacks) {
var self = this;
when(_107, function() {
self._watchCallbacks(name, _105, _103);
});
}
return this;
},_changeAttrValue: function(name, _108) {
var _109 = this.get(name);
this[name] = _108;
if (this._watchCallbacks) {
this._watchCallbacks(name, _109, _108);
}
return this;
},watch: function(name, _10a) {
var _10b = this._watchCallbacks;
if (!_10b) {
var self = this;
_10b = this._watchCallbacks = function(name, _10c, _10d, _10e) {
var _10f = function(_110) {
if (_110) {
_110 = _110.slice();
for (var i = 0, l = _110.length; i < l; i++) {
_110[i].call(self, name, _10c, _10d);
}
}
};
_10f(_10b["_" + name]);
if (!_10e) {
_10f(_10b["*"]);
}
};
}
if (!_10a && typeof name === "function") {
_10a = name;
name = "*";
} else {
name = "_" + name;
}
var _111 = _10b[name];
if (typeof _111 !== "object") {
_111 = _10b[name] = [];
}
_111.push(_10a);
var _112 = {};
_112.unwatch = _112.remove = function() {
var _113 = _100.indexOf(_111, _10a);
if (_113 > -1) {
_111.splice(_113, 1);
}
};
return _112;
}});
});
},"dijit/Destroyable": function() {
define("dijit/Destroyable", ["dojo/_base/array", "dojo/aspect", "dojo/_base/declare"], function(_114, _115, _116) {
return _116("dijit.Destroyable", null, {destroy: function(_117) {
this._destroyed = true;
},own: function() {
_114.forEach(arguments, function(_118) {
var _119 = "destroyRecursive" in _118 ? "destroyRecursive" : "destroy" in _118 ? "destroy" : "remove";
var odh = _115.before(this, "destroy", function(_11a) {
_118[_119](_11a);
});
var hdh = _115.after(_118, _119, function() {
odh.remove();
hdh.remove();
}, true);
}, this);
return arguments;
}});
});
},"dijit/registry": function() {
define("dijit/registry", ["dojo/_base/array", "dojo/sniff", "dojo/_base/unload", "dojo/_base/window", "./main"], function(_11b, has, _11c, win, _11d) {
var _11e = {}, hash = {};
var _11f = {length: 0,add: function(_120) {
if (hash[_120.id]) {
throw new Error("Tried to register widget with id==" + _120.id + " but that id is already registered");
}
hash[_120.id] = _120;
this.length++;
},remove: function(id) {
if (hash[id]) {
delete hash[id];
this.length--;
}
},byId: function(id) {
return typeof id == "string" ? hash[id] : id;
},byNode: function(node) {
return hash[node.getAttribute("widgetId")];
},toArray: function() {
var ar = [];
for (var id in hash) {
ar.push(hash[id]);
}
return ar;
},getUniqueId: function(_121) {
var id;
do {
id = _121 + "_" + (_121 in _11e ? ++_11e[_121] : _11e[_121] = 0);
} while (hash[id]);
return _11d._scopeName == "dijit" ? id : _11d._scopeName + "_" + id;
},findWidgets: function(root, _122) {
var _123 = [];
function _124(root) {
for (var node = root.firstChild; node; node = node.nextSibling) {
if (node.nodeType == 1) {
var _125 = node.getAttribute("widgetId");
if (_125) {
var _126 = hash[_125];
if (_126) {
_123.push(_126);
}
} else {
if (node !== _122) {
_124(node);
}
}
}
}
}
;
_124(root);
return _123;
},_destroyAll: function() {
_11d._curFocus = null;
_11d._prevFocus = null;
_11d._activeStack = [];
_11b.forEach(_11f.findWidgets(win.body()), function(_127) {
if (!_127._destroyed) {
if (_127.destroyRecursive) {
_127.destroyRecursive();
} else {
if (_127.destroy) {
_127.destroy();
}
}
}
});
},getEnclosingWidget: function(node) {
while (node) {
var id = node.nodeType == 1 && node.getAttribute("widgetId");
if (id) {
return hash[id];
}
node = node.parentNode;
}
return null;
},_hash: hash};
_11d.registry = _11f;
return _11f;
});
},"dijit/main": function() {
define("dijit/main", ["dojo/_base/kernel"], function(dojo) {
return dojo.dijit;
});
},"dojo/string": function() {
define(["./_base/kernel", "./_base/lang"], function(_128, lang) {
var _129 = {};
lang.setObject("dojo.string", _129);
_129.rep = function(str, num) {
if (num <= 0 || !str) {
return "";
}
var buf = [];
for (; ; ) {
if (num & 1) {
buf.push(str);
}
if (!(num >>= 1)) {
break;
}
str += str;
}
return buf.join("");
};
_129.pad = function(text, size, ch, end) {
if (!ch) {
ch = "0";
}
var out = String(text), pad = _129.rep(ch, Math.ceil((size - out.length) / ch.length));
return end ? out + pad : pad + out;
};
_129.substitute = function(_12a, map, _12b, _12c) {
_12c = _12c || _128.global;
_12b = _12b ? lang.hitch(_12c, _12b) : function(v) {
return v;
};
return _12a.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g, function(_12d, key, _12e) {
var _12f = lang.getObject(key, false, map);
if (_12e) {
_12f = lang.getObject(_12e, false, _12c).call(_12c, _12f, key);
}
return _12b(_12f, key).toString();
});
};
_129.trim = String.prototype.trim ? lang.trim : function(str) {
str = str.replace(/^\s+/, "");
for (var i = str.length - 1; i >= 0; i--) {
if (/\S/.test(str.charAt(i))) {
str = str.substring(0, i + 1);
break;
}
}
return str;
};
return _129;
});
},"dojo/cache": function() {
define(["./_base/kernel", "./text"], function(dojo) {
return dojo.cache;
});
},"dojo/text": function() {
define(["./_base/kernel", "require", "./has", "./_base/xhr"], function(dojo, _130, has, xhr) {
var _131;
if (1) {
_131 = function(url, sync, load) {
xhr("GET", {url: url,sync: !!sync,load: load,headers: dojo.config.textPluginHeaders || {}});
};
} else {
if (_130.getText) {
_131 = _130.getText;
} else {
console.error("dojo/text plugin failed to load because loader does not support getText");
}
}
var _132 = {}, _133 = function(text) {
if (text) {
text = text.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, "");
var _134 = text.match(/
<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if (_134) {
text = _134[1];
}
} else {
text = "";
}
return text;
}, _135 = {}, _136 = {};
dojo.cache = function(_137, url, _138) {
var key;
if (typeof _137 == "string") {
if (/\//.test(_137)) {
key = _137;
_138 = url;
} else {
key = _130.toUrl(_137.replace(/\./g, "/") + (url ? ("/" + url) : ""));
}
} else {
key = _137 + "";
_138 = url;
}
var val = (_138 != undefined && typeof _138 != "string") ? _138.value : _138, _139 = _138 && _138.sanitize;
if (typeof val == "string") {
_132[key] = val;
return _139 ? _133(val) : val;
} else {
if (val === null) {
delete _132[key];
return null;
} else {
if (!(key in _132)) {
_131(key, true, function(text) {
_132[key] = text;
});
}
return _139 ? _133(_132[key]) : _132[key];
}
}
};
return {dynamic: true,normalize: function(id, _13a) {
var _13b = id.split("!"), url = _13b[0];
return (/^\./.test(url) ? _13a(url) : url) + (_13b[1] ? "!" + _13b[1] : "");
},load: function(id, _13c, load) {
var _13d = id.split("!"), _13e = _13d.length > 1, _13f = _13d[0], url = _13c.toUrl(_13d[0]), _140 = "url:" + url, text = _135, _141 = function(text) {
load(_13e ? _133(text) : text);
};
if (_13f in _132) {
text = _132[_13f];
} else {
if (_140 in _13c.cache) {
text = _13c.cache[_140];
} else {
if (url in _132) {
text = _132[url];
}
}
}
if (text === _135) {
if (_136[url]) {
_136[url].push(_141);
} else {
var _142 = _136[url] = [_141];
_131(url, !_13c.async, function(text) {
_132[_13f] = _132[url] = text;
for (var i = 0; i < _142.length; ) {
_142[i++](text);
}
delete _136[url];
});
}
} else {
_141(text);
}
}};
});
},"dijit/_WidgetsInTemplateMixin": function() {
define("dijit/_WidgetsInTemplateMixin", ["dojo/_base/array", "dojo/_base/declare", "dojo/parser"], function(_143, _144, _145) {
return _144("dijit._WidgetsInTemplateMixin", null, {_earlyTemplatedStartup: false,widgetsInTemplate: true,_beforeFillContent: function() {
if (this.widgetsInTemplate) {
var node = this.domNode;
var cw = (this._startupWidgets = _145.parse(node, {noStart: !this._earlyTemplatedStartup,template: true,inherited: {dir: this.dir,lang: this.lang,textDir: this.textDir},propsThis: this,scope: "dojo"}));
if (!cw.isFulfilled()) {
throw new Error(this.declaredClass + ": parser returned unfilled promise (probably waiting for module auto-load), " + "unsupported by _WidgetsInTemplateMixin.   Must pre-load all supporting widgets before instantiation.");
}
this._attachTemplateNodes(cw, function(n, p) {
return n[p];
});
}
},startup: function() {
_143.forEach(this._startupWidgets, function(w) {
if (w && !w._started && w.startup) {
w.startup();
}
});
this.inherited(arguments);
}});
});
},"dojo/parser": function() {
define(["require", "./_base/kernel", "./_base/lang", "./_base/array", "./_base/config", "./_base/html", "./_base/window", "./_base/url", "./_base/json", "./aspect", "./date/stamp", "./Deferred", "./has", "./query", "./on", "./ready"], function(_146, dojo, _147, _148, _149, _14a, _14b, _14c, _14d, _14e, _14f, _150, has, _151, don, _152) {
new Date("X");
var _153 = 0;
_14e.after(_147, "extend", function() {
_153++;
}, true);
function _154(ctor) {
var map = ctor._nameCaseMap, _155 = ctor.prototype;
if (!map || map._extendCnt < _153) {
map = ctor._nameCaseMap = {};
for (var name in _155) {
if (name.charAt(0) === "_") {
continue;
}
map[name.toLowerCase()] = name;
}
map._extendCnt = _153;
}
return map;
}
;
var _156 = {};
function _157(_158) {
var ts = _158.join();
if (!_156[ts]) {
var _159 = [];
for (var i = 0, l = _158.length; i < l; i++) {
var t = _158[i];
_159[_159.length] = (_156[t] = _156[t] || (_147.getObject(t) || (~t.indexOf("/") && _146(t))));
}
var ctor = _159.shift();
_156[ts] = _159.length ? (ctor.createSubclass ? ctor.createSubclass(_159) : ctor.extend.apply(ctor, _159)) : ctor;
}
return _156[ts];
}
;
var _15a = {_clearCache: function() {
_153++;
_156 = {};
},_functionFromScript: function(_15b, _15c) {
var _15d = "", _15e = "", _15f = (_15b.getAttribute(_15c + "args") || _15b.getAttribute("args")), _160 = _15b.getAttribute("with");
var _161 = (_15f || "").split(/\s*,\s*/);
if (_160 && _160.length) {
_148.forEach(_160.split(/\s*,\s*/), function(part) {
_15d += "with(" + part + "){";
_15e += "}";
});
}
return new Function(_161, _15d + _15b.innerHTML + _15e);
},instantiate: function(_162, _163, _164) {
_163 = _163 || {};
_164 = _164 || {};
var _165 = (_164.scope || dojo._scopeName) + "Type", _166 = "data-" + (_164.scope || dojo._scopeName) + "-", _167 = _166 + "type", _168 = _166 + "mixins";
var list = [];
_148.forEach(_162, function(node) {
var type = _165 in _163 ? _163[_165] : node.getAttribute(_167) || node.getAttribute(_165);
if (type) {
var _169 = node.getAttribute(_168), _16a = _169 ? [type].concat(_169.split(/\s*,\s*/)) : [type];
list.push({node: node,types: _16a});
}
});
return this._instantiate(list, _163, _164);
},_instantiate: function(_16b, _16c, _16d) {
var _16e = _148.map(_16b, function(obj) {
var ctor = obj.ctor || _157(obj.types);
if (!ctor) {
throw new Error("Unable to resolve constructor for: '" + obj.types.join() + "'");
}
return this.construct(ctor, obj.node, _16c, _16d, obj.scripts, obj.inherited);
}, this);
if (!_16c._started && !_16d.noStart) {
_148.forEach(_16e, function(_16f) {
if (typeof _16f.startup === "function" && !_16f._started) {
_16f.startup();
}
});
}
return _16e;
},construct: function(ctor, node, _170, _171, _172, _173) {
var _174 = ctor && ctor.prototype;
_171 = _171 || {};
var _175 = {};
if (_171.defaults) {
_147.mixin(_175, _171.defaults);
}
if (_173) {
_147.mixin(_175, _173);
}
var _176;
if (has("dom-attributes-explicit")) {
_176 = node.attributes;
} else {
if (has("dom-attributes-specified-flag")) {
_176 = _148.filter(node.attributes, function(a) {
return a.specified;
});
} else {
var _177 = /^input$|^img$/i.test(node.nodeName) ? node : node.cloneNode(false), _178 = _177.outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g, "").replace(/^\s*<[a-zA-Z0-9]*\s*/, "").replace(/\s*>.*$/, "");
_176 = _148.map(_178.split(/\s+/), function(name) {
var _179 = name.toLowerCase();
return {name: name,value: (node.nodeName == "LI" && name == "value") || _179 == "enctype" ? node.getAttribute(_179) : node.getAttributeNode(_179).value};
});
}
}
var _17a = _171.scope || dojo._scopeName, _17b = "data-" + _17a + "-", hash = {};
if (_17a !== "dojo") {
hash[_17b + "props"] = "data-dojo-props";
hash[_17b + "type"] = "data-dojo-type";
hash[_17b + "mixins"] = "data-dojo-mixins";
hash[_17a + "type"] = "dojoType";
hash[_17b + "id"] = "data-dojo-id";
}
var i = 0, item, _17c = [], _17d, _17e;
while (item = _176[i++]) {
var name = item.name, _17f = name.toLowerCase(), _180 = item.value;
switch (hash[_17f] || _17f) {
case "data-dojo-type":
case "dojotype":
case "data-dojo-mixins":
break;
case "data-dojo-props":
_17e = _180;
break;
case "data-dojo-id":
case "jsid":
_17d = _180;
break;
case "data-dojo-attach-point":
case "dojoattachpoint":
_175.dojoAttachPoint = _180;
break;
case "data-dojo-attach-event":
case "dojoattachevent":
_175.dojoAttachEvent = _180;
break;
case "class":
_175["class"] = node.className;
break;
case "style":
_175["style"] = node.style && node.style.cssText;
break;
default:
if (!(name in _174)) {
var map = _154(ctor);
name = map[_17f] || name;
}
if (name in _174) {
switch (typeof _174[name]) {
case "string":
_175[name] = _180;
break;
case "number":
_175[name] = _180.length ? Number(_180) : NaN;
break;
case "boolean":
_175[name] = _180.toLowerCase() != "false";
break;
case "function":
if (_180 === "" || _180.search(/[^\w\.]+/i) != -1) {
_175[name] = new Function(_180);
} else {
_175[name] = _147.getObject(_180, false) || new Function(_180);
}
_17c.push(name);
break;
default:
var pVal = _174[name];
_175[name] = (pVal && "length" in pVal) ? (_180 ? _180.split(/\s*,\s*/) : []) : (pVal instanceof Date) ? (_180 == "" ? new Date("") : _180 == "now" ? new Date() : _14f.fromISOString(_180)) : (pVal instanceof _14c) ? (dojo.baseUrl + _180) : _14d.fromJson(_180);
}
} else {
_175[name] = _180;
}
}
}
for (var j = 0; j < _17c.length; j++) {
var _181 = _17c[j].toLowerCase();
node.removeAttribute(_181);
node[_181] = null;
}
if (_17e) {
try {
_17e = _14d.fromJson.call(_171.propsThis, "{" + _17e + "}");
_147.mixin(_175, _17e);
} catch (e) {
throw new Error(e.toString() + " in data-dojo-props='" + _17e + "'");
}
}
_147.mixin(_175, _170);
if (!_172) {
_172 = (ctor && (ctor._noScript || _174._noScript) ? [] : _151("> script[type^='dojo/']", node));
}
var _182 = [], _183 = [], _184 = [], ons = [];
if (_172) {
for (i = 0; i < _172.length; i++) {
var _185 = _172[i];
node.removeChild(_185);
var _186 = (_185.getAttribute(_17b + "event") || _185.getAttribute("event")), prop = _185.getAttribute(_17b + "prop"), _187 = _185.getAttribute(_17b + "method"), _188 = _185.getAttribute(_17b + "advice"), _189 = _185.getAttribute("type"), nf = this._functionFromScript(_185, _17b);
if (_186) {
if (_189 == "dojo/connect") {
_182.push({method: _186,func: nf});
} else {
if (_189 == "dojo/on") {
ons.push({event: _186,func: nf});
} else {
_175[_186] = nf;
}
}
} else {
if (_189 == "dojo/aspect") {
_182.push({method: _187,advice: _188,func: nf});
} else {
if (_189 == "dojo/watch") {
_184.push({prop: prop,func: nf});
} else {
_183.push(nf);
}
}
}
}
}
var _18a = ctor.markupFactory || _174.markupFactory;
var _18b = _18a ? _18a(_175, node, ctor) : new ctor(_175, node);
if (_17d) {
_147.setObject(_17d, _18b);
}
for (i = 0; i < _182.length; i++) {
_14e[_182[i].advice || "after"](_18b, _182[i].method, _147.hitch(_18b, _182[i].func), true);
}
for (i = 0; i < _183.length; i++) {
_183[i].call(_18b);
}
for (i = 0; i < _184.length; i++) {
_18b.watch(_184[i].prop, _184[i].func);
}
for (i = 0; i < ons.length; i++) {
don(_18b, ons[i].event, ons[i].func);
}
return _18b;
},scan: function(root, _18c) {
var list = [], mids = [], _18d = {};
var _18e = (_18c.scope || dojo._scopeName) + "Type", _18f = "data-" + (_18c.scope || dojo._scopeName) + "-", _190 = _18f + "type", _191 = _18f + "textdir", _192 = _18f + "mixins";
var node = root.firstChild;
var _193 = _18c.inherited;
if (!_193) {
function _194(node, attr) {
return (node.getAttribute && node.getAttribute(attr)) || (node.parentNode && _194(node.parentNode, attr));
}
;
_193 = {dir: _194(root, "dir"),lang: _194(root, "lang"),textDir: _194(root, _191)};
for (var key in _193) {
if (!_193[key]) {
delete _193[key];
}
}
}
var _195 = {inherited: _193};
var _196;
var _197;
function _198(_199) {
if (!_199.inherited) {
_199.inherited = {};
var node = _199.node, _19a = _198(_199.parent);
var _19b = {dir: node.getAttribute("dir") || _19a.dir,lang: node.getAttribute("lang") || _19a.lang,textDir: node.getAttribute(_191) || _19a.textDir};
for (var key in _19b) {
if (_19b[key]) {
_199.inherited[key] = _19b[key];
}
}
}
return _199.inherited;
}
;
while (true) {
if (!node) {
if (!_195 || !_195.node) {
break;
}
node = _195.node.nextSibling;
_197 = false;
_195 = _195.parent;
_196 = _195.scripts;
continue;
}
if (node.nodeType != 1) {
node = node.nextSibling;
continue;
}
if (_196 && node.nodeName.toLowerCase() == "script") {
type = node.getAttribute("type");
if (type && /^dojo\/\w/i.test(type)) {
_196.push(node);
}
node = node.nextSibling;
continue;
}
if (_197) {
node = node.nextSibling;
continue;
}
var type = node.getAttribute(_190) || node.getAttribute(_18e);
var _19c = node.firstChild;
if (!type && (!_19c || (_19c.nodeType == 3 && !_19c.nextSibling))) {
node = node.nextSibling;
continue;
}
var _19d;
var ctor = null;
if (type) {
var _19e = node.getAttribute(_192), _19f = _19e ? [type].concat(_19e.split(/\s*,\s*/)) : [type];
try {
ctor = _157(_19f);
} catch (e) {
}
if (!ctor) {
_148.forEach(_19f, function(t) {
if (~t.indexOf("/") && !_18d[t]) {
_18d[t] = true;
mids[mids.length] = t;
}
});
}
var _1a0 = ctor && !ctor.prototype._noScript ? [] : null;
_19d = {types: _19f,ctor: ctor,parent: _195,node: node,scripts: _1a0};
_19d.inherited = _198(_19d);
list.push(_19d);
} else {
_19d = {node: node,scripts: _196,parent: _195};
}
node = _19c;
_196 = _1a0;
_197 = ctor && ctor.prototype.stopParser && !(_18c.template);
_195 = _19d;
}
var d = new _150();
if (mids.length) {
if (has("dojo-debug-messages")) {
console.warn("WARNING: Modules being Auto-Required: " + mids.join(", "));
}
_146(mids, function() {
d.resolve(_148.filter(list, function(_1a1) {
if (!_1a1.ctor) {
try {
_1a1.ctor = _157(_1a1.types);
} catch (e) {
}
}
var _1a2 = _1a1.parent;
while (_1a2 && !_1a2.types) {
_1a2 = _1a2.parent;
}
var _1a3 = _1a1.ctor && _1a1.ctor.prototype;
_1a1.instantiateChildren = !(_1a3 && _1a3.stopParser && !(_18c.template));
_1a1.instantiate = !_1a2 || (_1a2.instantiate && _1a2.instantiateChildren);
return _1a1.instantiate;
}));
});
} else {
d.resolve(list);
}
return d.promise;
},_require: function(_1a4) {
var hash = _14d.fromJson("{" + _1a4.innerHTML + "}"), vars = [], mids = [], d = new _150();
for (var name in hash) {
vars.push(name);
mids.push(hash[name]);
}
_146(mids, function() {
for (var i = 0; i < vars.length; i++) {
_147.setObject(vars[i], arguments[i]);
}
d.resolve(arguments);
});
return d.promise;
},_scanAmd: function(root) {
var _1a5 = new _150(), _1a6 = _1a5.promise;
_1a5.resolve(true);
var self = this;
_151("script[type='dojo/require']", root).forEach(function(node) {
_1a6 = _1a6.then(function() {
return self._require(node);
});
node.parentNode.removeChild(node);
});
return _1a6;
},parse: function(_1a7, _1a8) {
var root;
if (!_1a8 && _1a7 && _1a7.rootNode) {
_1a8 = _1a7;
root = _1a8.rootNode;
} else {
if (_1a7 && _147.isObject(_1a7) && !("nodeType" in _1a7)) {
_1a8 = _1a7;
} else {
root = _1a7;
}
}
root = root ? _14a.byId(root) : _14b.body();
_1a8 = _1a8 || {};
var _1a9 = _1a8.template ? {template: true} : {}, _1aa = [], self = this;
var p = this._scanAmd(root, _1a8).then(function() {
return self.scan(root, _1a8);
}).then(function(_1ab) {
return _1aa = _1aa.concat(self._instantiate(_1ab, _1a9, _1a8));
}).otherwise(function(e) {
console.error("dojo/parser::parse() error", e);
throw e;
});
_147.mixin(_1aa, p);
return _1aa;
}};
if (1) {
dojo.parser = _15a;
}
if (_149.parseOnLoad) {
_152(100, _15a, "parse");
}
return _15a;
});
},"dojo/_base/url": function() {
define(["./kernel"], function(dojo) {
var ore = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"), ire = new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"), _1ac = function() {
var n = null, _1ad = arguments, uri = [_1ad[0]];
for (var i = 1; i < _1ad.length; i++) {
if (!_1ad[i]) {
continue;
}
var _1ae = new _1ac(_1ad[i] + ""), _1af = new _1ac(uri[0] + "");
if (_1ae.path == "" && !_1ae.scheme && !_1ae.authority && !_1ae.query) {
if (_1ae.fragment != n) {
_1af.fragment = _1ae.fragment;
}
_1ae = _1af;
} else {
if (!_1ae.scheme) {
_1ae.scheme = _1af.scheme;
if (!_1ae.authority) {
_1ae.authority = _1af.authority;
if (_1ae.path.charAt(0) != "/") {
var path = _1af.path.substring(0, _1af.path.lastIndexOf("/") + 1) + _1ae.path;
var segs = path.split("/");
for (var j = 0; j < segs.length; j++) {
if (segs[j] == ".") {
if (j == segs.length - 1) {
segs[j] = "";
} else {
segs.splice(j, 1);
j--;
}
} else {
if (j > 0 && !(j == 1 && segs[0] == "") && segs[j] == ".." && segs[j - 1] != "..") {
if (j == (segs.length - 1)) {
segs.splice(j, 1);
segs[j - 1] = "";
} else {
segs.splice(j - 1, 2);
j -= 2;
}
}
}
}
_1ae.path = segs.join("/");
}
}
}
}
uri = [];
if (_1ae.scheme) {
uri.push(_1ae.scheme, ":");
}
if (_1ae.authority) {
uri.push("//", _1ae.authority);
}
uri.push(_1ae.path);
if (_1ae.query) {
uri.push("?", _1ae.query);
}
if (_1ae.fragment) {
uri.push("#", _1ae.fragment);
}
}
this.uri = uri.join("");
var r = this.uri.match(ore);
this.scheme = r[2] || (r[1] ? "" : n);
this.authority = r[4] || (r[3] ? "" : n);
this.path = r[5];
this.query = r[7] || (r[6] ? "" : n);
this.fragment = r[9] || (r[8] ? "" : n);
if (this.authority != n) {
r = this.authority.match(ire);
this.user = r[3] || n;
this.password = r[4] || n;
this.host = r[6] || r[7];
this.port = r[9] || n;
}
};
_1ac.prototype.toString = function() {
return this.uri;
};
return dojo._Url = _1ac;
});
},"dojo/date/stamp": function() {
define(["../_base/lang", "../_base/array"], function(lang, _1b0) {
var _1b1 = {};
lang.setObject("dojo.date.stamp", _1b1);
_1b1.fromISOString = function(_1b2, _1b3) {
if (!_1b1._isoRegExp) {
_1b1._isoRegExp = /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
}
var _1b4 = _1b1._isoRegExp.exec(_1b2), _1b5 = null;
if (_1b4) {
_1b4.shift();
if (_1b4[1]) {
_1b4[1]--;
}
if (_1b4[6]) {
_1b4[6] *= 1000;
}
if (_1b3) {
_1b3 = new Date(_1b3);
_1b0.forEach(_1b0.map(["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds"], function(prop) {
return _1b3["get" + prop]();
}), function(_1b6, _1b7) {
_1b4[_1b7] = _1b4[_1b7] || _1b6;
});
}
_1b5 = new Date(_1b4[0] || 1970, _1b4[1] || 0, _1b4[2] || 1, _1b4[3] || 0, _1b4[4] || 0, _1b4[5] || 0, _1b4[6] || 0);
if (_1b4[0] < 100) {
_1b5.setFullYear(_1b4[0] || 1970);
}
var _1b8 = 0, _1b9 = _1b4[7] && _1b4[7].charAt(0);
if (_1b9 != "Z") {
_1b8 = ((_1b4[8] || 0) * 60) + (Number(_1b4[9]) || 0);
if (_1b9 != "-") {
_1b8 *= -1;
}
}
if (_1b9) {
_1b8 -= _1b5.getTimezoneOffset();
}
if (_1b8) {
_1b5.setTime(_1b5.getTime() + _1b8 * 60000);
}
}
return _1b5;
};
_1b1.toISOString = function(_1ba, _1bb) {
var _1bc = function(n) {
return (n < 10) ? "0" + n : n;
};
_1bb = _1bb || {};
var _1bd = [], _1be = _1bb.zulu ? "getUTC" : "get", date = "";
if (_1bb.selector != "time") {
var year = _1ba[_1be + "FullYear"]();
date = ["0000".substr((year + "").length) + year, _1bc(_1ba[_1be + "Month"]() + 1), _1bc(_1ba[_1be + "Date"]())].join("-");
}
_1bd.push(date);
if (_1bb.selector != "date") {
var time = [_1bc(_1ba[_1be + "Hours"]()), _1bc(_1ba[_1be + "Minutes"]()), _1bc(_1ba[_1be + "Seconds"]())].join(":");
var _1bf = _1ba[_1be + "Milliseconds"]();
if (_1bb.milliseconds) {
time += "." + (_1bf < 100 ? "0" : "") + _1bc(_1bf);
}
if (_1bb.zulu) {
time += "Z";
} else {
if (_1bb.selector != "time") {
var _1c0 = _1ba.getTimezoneOffset();
var _1c1 = Math.abs(_1c0);
time += (_1c0 > 0 ? "-" : "+") + _1bc(Math.floor(_1c1 / 60)) + ":" + _1bc(_1c1 % 60);
}
}
_1bd.push(time);
}
return _1bd.join("T");
};
return _1b1;
});
},"dojox/app/controllers/Load": function() {
define("dojox/app/controllers/Load", ["dojo/_base/lang", "dojo/_base/declare", "dojo/on", "dojo/Deferred", "dojo/when", "../Controller", "../View"], function(lang, _1c2, on, _1c3, when, _1c4, View) {
return _1c2("dojox.app.controllers.Load", _1c4, {constructor: function(app, _1c5) {
this.events = {"load": this.load};
this.inherited(arguments);
},load: function(_1c6) {
var _1c7 = _1c6.parent || this.app;
var _1c8 = _1c6.viewId || "";
var _1c9 = _1c8.split(",");
var _1ca = _1c9.shift();
var _1cb = _1c9.join(",");
var _1cc = _1c6.params || "";
var def = this.loadChild(_1c7, _1ca, _1cb, _1cc);
if (_1c6.callback) {
when(def, _1c6.callback);
}
return def;
},createChild: function(_1cd, _1ce, _1cf, _1d0) {
var id = _1cd.id + "_" + _1ce;
if (_1cd.children[id]) {
return _1cd.children[id];
}
var _1d1 = new View(lang.mixin({"app": this.app,"id": id,"name": _1ce,"parent": _1cd}, {"params": _1d0}));
_1cd.children[id] = _1d1;
return _1d1.start();
},loadChild: function(_1d2, _1d3, _1d4, _1d5) {
if (!_1d2) {
throw Error("No parent for Child '" + _1d3 + "'.");
}
if (!_1d3) {
var _1d6 = _1d2.defaultView ? _1d2.defaultView.split(",") : "default";
_1d3 = _1d6.shift();
_1d4 = _1d6.join(",");
}
var _1d7 = new _1c3();
var _1d8;
try {
_1d8 = this.createChild(_1d2, _1d3, _1d4, _1d5);
} catch (ex) {
_1d7.reject("load child '" + _1d3 + "' error.");
return _1d7.promise;
}
when(_1d8, lang.hitch(this, function(_1d9) {
if (!_1d4 && _1d9.defaultView) {
_1d4 = _1d9.defaultView;
}
var _1da = _1d4.split(",");
_1d3 = _1da.shift();
_1d4 = _1da.join(",");
if (_1d3) {
var _1db = this.loadChild(_1d9, _1d3, _1d4, _1d5);
when(_1db, function() {
_1d7.resolve();
}, function() {
_1d7.reject("load child '" + _1d3 + "' error.");
});
} else {
_1d7.resolve();
}
}), function() {
_1d7.reject("load child '" + _1d3 + "' error.");
});
return _1d7.promise;
}});
});
},"dojox/app/Controller": function() {
define("dojox/app/Controller", ["dojo/_base/lang", "dojo/_base/declare", "dojo/on"], function(lang, _1dc, on) {
return _1dc("dojox.app.Controller", null, {constructor: function(app, _1dd) {
this.events = this.events || _1dd;
this._boundEvents = [];
this.app = app;
if (this.events) {
for (var item in this.events) {
if (item.charAt(0) !== "_") {
this.bind(this.app.domNode, item, lang.hitch(this, this.events[item]));
}
}
}
},bind: function(_1de, _1df, _1e0) {
if (!_1e0) {
console.warn("bind event '" + _1df + "' without callback function.");
}
var _1e1 = on(_1de, _1df, _1e0);
this._boundEvents.push({"event": _1df,"evented": _1de,"signal": _1e1});
},unbind: function(_1e2, _1e3) {
var len = this._boundEvents.length;
for (var i = 0; i < len; i++) {
if ((this._boundEvents[i]["event"] == _1e3) && (this._boundEvents[i]["evented"] == _1e2)) {
this._boundEvents[i]["signal"].remove();
this._boundEvents.splice(i, 1);
return;
}
}
console.warn("event '" + _1e3 + "' not bind on ", _1e2);
}});
});
},"dojox/app/controllers/Transition": function() {
define("dojox/app/controllers/Transition", ["dojo/_base/lang", "dojo/_base/declare", "dojo/has", "dojo/on", "dojo/Deferred", "dojo/when", "dojox/css3/transit", "../Controller"], function(lang, _1e4, has, on, _1e5, when, _1e6, _1e7) {
return _1e4("dojox.app.controllers.Transition", _1e7, {proceeding: false,waitingQueue: [],constructor: function(app, _1e8) {
this.events = {"transition": this.transition,"startTransition": this.onStartTransition};
this.inherited(arguments);
},transition: function(_1e9) {
this.proceedTransition(_1e9);
},onStartTransition: function(evt) {
if (evt.preventDefault) {
evt.preventDefault();
}
evt.cancelBubble = true;
if (evt.stopPropagation) {
evt.stopPropagation();
}
var _1ea = evt.detail.target;
var _1eb = /#(.+)/;
if (!_1ea && _1eb.test(evt.detail.href)) {
_1ea = evt.detail.href.match(_1eb)[1];
}
this.transition({"viewId": _1ea,opts: lang.mixin({}, evt.detail)});
},proceedTransition: function(_1ec) {
if (this.proceeding) {
this.app.log("in app/controllers/Transition proceedTransition push event", _1ec);
this.waitingQueue.push(_1ec);
return;
}
this.proceeding = true;
this.app.log("in app/controllers/Transition proceedTransition calling trigger load", _1ec);
var _1ed = _1ec.params || {};
if (_1ec.opts && _1ec.opts.params) {
_1ed = _1ec.params || _1ec.opts.params;
}
this.app.trigger("load", {"viewId": _1ec.viewId,"params": _1ed,"callback": lang.hitch(this, function() {
var _1ee = this._doTransition(_1ec.viewId, _1ec.opts, _1ed, this.app);
when(_1ee, lang.hitch(this, function() {
this.proceeding = false;
var _1ef = this.waitingQueue.shift();
if (_1ef) {
this.proceedTransition(_1ef);
}
}));
})});
},_getDefaultTransition: function(_1f0) {
var _1f1 = _1f0;
var _1f2 = _1f1.defaultTransition;
while (!_1f2 && _1f1.parent) {
_1f1 = _1f1.parent;
_1f2 = _1f1.defaultTransition;
}
return _1f2;
},_doTransition: function(_1f3, opts, _1f4, _1f5) {
this.app.log("in app/controllers/Transition._doTransition transitionTo=[", _1f3, "], parent.name=[", _1f5.name, "], opts=", opts);
if (!_1f5) {
throw Error("view parent not found in transition.");
}
var _1f6, toId, _1f7, next, _1f4, _1f8 = _1f5.selectedChild;
if (_1f3) {
_1f6 = _1f3.split(",");
} else {
_1f6 = _1f5.defaultView.split(",");
}
toId = _1f6.shift();
_1f7 = _1f6.join(",");
next = _1f5.children[_1f5.id + "_" + toId];
if (!next) {
throw Error("child view must be loaded before transition.");
}
next.params = _1f4 || next.params;
if (!_1f7 && next.defaultView) {
_1f7 = next.defaultView;
}
if (!_1f8) {
this.app.log("> in Transition._doTransition calling next.beforeActivate next name=[", next.name, "], parent.name=[", next.parent.name, "],  !current path,");
next.beforeActivate();
this.app.log("> in Transition._doTransition calling next.afterActivate next name=[", next.name, "], parent.name=[", next.parent.name, "],  !current path");
next.afterActivate();
this.app.log("  > in Transition._doTransition calling app.triggger select view next name=[", next.name, "], parent.name=[", next.parent.name, "], !current path");
this.app.trigger("select", {"parent": _1f5,"view": next});
return;
}
if (next !== _1f8) {
var _1f9 = _1f8.selectedChild;
while (_1f9) {
this.app.log("< in Transition._doTransition calling subChild.beforeDeactivate subChild name=[", _1f9.name, "], parent.name=[", _1f9.parent.name, "], next!==current path");
_1f9.beforeDeactivate();
_1f9 = _1f9.selectedChild;
}
this.app.log("< in Transition._doTransition calling current.beforeDeactivate current name=[", _1f8.name, "], parent.name=[", _1f8.parent.name, "], next!==current path");
_1f8.beforeDeactivate();
this.app.log("> in Transition._doTransition calling next.beforeActivate next name=[", next.name, "], parent.name=[", next.parent.name, "], next!==current path");
next.beforeActivate();
this.app.log("> in Transition._doTransition calling app.triggger select view next name=[", next.name, "], parent.name=[", next.parent.name, "], next!==current path");
this.app.trigger("select", {"parent": _1f5,"view": next});
var _1fa = true;
if (!has("ie")) {
var _1fb = lang.mixin({}, opts);
_1fb = lang.mixin({}, _1fb, {reverse: (_1fb.reverse || _1fb.transitionDir === -1) ? true : false,transition: _1fb.transition || this._getDefaultTransition(_1f5) || "none"});
_1fa = _1e6(_1f8.domNode, next.domNode, _1fb);
}
when(_1fa, lang.hitch(this, function() {
var _1fc = _1f8.selectedChild;
while (_1fc) {
this.app.log("  < in Transition._doTransition calling subChild.afterDeactivate subChild name=[", _1fc.name, "], parent.name=[", _1fc.parent.name, "], next!==current path");
_1fc.afterDeactivate();
_1fc = _1fc.selectedChild;
}
this.app.log("  < in Transition._doTransition calling current.afterDeactivate current name=[", _1f8.name, "], parent.name=[", _1f8.parent.name, "], next!==current path");
_1f8.afterDeactivate();
this.app.log("  > in Transition._doTransition calling next.afterActivate next name=[", next.name, "], parent.name=[", next.parent.name, "], next!==current path");
next.afterActivate();
if (_1f7) {
this._doTransition(_1f7, opts, _1f4, next);
}
}));
return _1fa;
} else {
this.app.log("< in Transition._doTransition calling next.beforeDeactivate next name=[", next.name, "], parent.name=[", next.parent.name, "], next==current path");
next.beforeDeactivate();
this.app.log("  < in Transition._doTransition calling next.afterDeactivate next name=[", next.name, "], parent.name=[", next.parent.name, "], next==current path");
next.afterDeactivate();
this.app.log("> in Transition._doTransition calling next.beforeActivate next name=[", next.name, "], parent.name=[", next.parent.name, "], next==current path");
next.beforeActivate();
this.app.log("  > in Transition._doTransition calling next.afterActivate next name=[", next.name, "], parent.name=[", next.parent.name, "], next==current path");
next.afterActivate();
this.app.log("> in Transition._doTransition calling app.triggger select view next name=[", next.name, "], parent.name=[", next.parent.name, "], next==current path");
this.app.trigger("select", {"parent": _1f5,"view": next});
}
if (_1f7) {
return this._doTransition(_1f7, opts, _1f4, next);
}
}});
});
},"dojox/css3/transit": function() {
define("dojox/css3/transit", ["dojo/_base/array", "dojo/dom-style", "dojo/DeferredList", "./transition"], function(_1fd, _1fe, _1ff, _200) {
var _201 = function(from, to, _202) {
var rev = (_202 && _202.reverse) ? -1 : 1;
if (!_202 || !_202.transition || !_200[_202.transition]) {
_1fe.set(from, "display", "none");
_1fe.set(to, "display", "");
if (_202.transitionDefs) {
if (_202.transitionDefs[from.id]) {
_202.transitionDefs[from.id].resolve(from);
}
if (_202.transitionDefs[to.id]) {
_202.transitionDefs[to.id].resolve(to);
}
}
return new _1ff([]);
} else {
var defs = [];
var _203 = [];
var _204 = 250;
if (_202.transition === "fade") {
_204 = 600;
} else {
if (_202.transition === "flip") {
_204 = 200;
}
}
_1fe.set(from, "display", "");
_1fe.set(to, "display", "");
if (from) {
var _205 = _200[_202.transition](from, {"in": false,direction: rev,duration: _204,deferred: (_202.transitionDefs && _202.transitionDefs[from.id]) ? _202.transitionDefs[from.id] : null});
defs.push(_205.deferred);
_203.push(_205);
}
var _206 = _200[_202.transition](to, {direction: rev,duration: _204,deferred: (_202.transitionDefs && _202.transitionDefs[to.id]) ? _202.transitionDefs[to.id] : null});
defs.push(_206.deferred);
_203.push(_206);
if (_202.transition === "flip") {
_200.chainedPlay(_203);
} else {
_200.groupedPlay(_203);
}
return new _1ff(defs);
}
};
return _201;
});
},"dojo/DeferredList": function() {
define(["./_base/kernel", "./_base/Deferred", "./_base/array"], function(dojo, _207, _208) {
dojo.DeferredList = function(list, _209, _20a, _20b, _20c) {
var _20d = [];
_207.call(this);
var self = this;
if (list.length === 0 && !_209) {
this.resolve([0, []]);
}
var _20e = 0;
_208.forEach(list, function(item, i) {
item.then(function(_20f) {
if (_209) {
self.resolve([i, _20f]);
} else {
_210(true, _20f);
}
}, function(_211) {
if (_20a) {
self.reject(_211);
} else {
_210(false, _211);
}
if (_20b) {
return null;
}
throw _211;
});
function _210(_212, _213) {
_20d[i] = [_212, _213];
_20e++;
if (_20e === list.length) {
self.resolve(_20d);
}
}
;
});
};
dojo.DeferredList.prototype = new _207();
dojo.DeferredList.prototype.gatherResults = function(_214) {
var d = new dojo.DeferredList(_214, false, true, false);
d.addCallback(function(_215) {
var ret = [];
_208.forEach(_215, function(_216) {
ret.push(_216[1]);
});
return ret;
});
return d;
};
return dojo.DeferredList;
});
},"dojox/css3/transition": function() {
define("dojox/css3/transition", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/Deferred", "dojo/DeferredList", "dojo/on", "dojo/_base/sniff"], function(lang, _217, _218, _219, on, has) {
var _21a = "transitionend";
var _21b = "t";
var _21c = "translate3d(";
var _21d = ",0,0)";
if (has("webkit")) {
_21b = "WebkitT";
_21a = "webkitTransitionEnd";
} else {
if (has("mozilla")) {
_21b = "MozT";
_21c = "translateX(";
_21d = ")";
}
}
var _21e = function(args) {
var _21f = {startState: {},endState: {},node: null,duration: 250,"in": true,direction: 1,autoClear: true};
lang.mixin(this, _21f);
lang.mixin(this, args);
if (!this.deferred) {
this.deferred = new _218();
}
};
lang.extend(_21e, {play: function() {
_21e.groupedPlay([this]);
},_applyState: function(_220) {
var _221 = this.node.style;
for (var _222 in _220) {
if (_220.hasOwnProperty(_222)) {
_221[_222] = _220[_222];
}
}
},initState: function() {
this.node.style[_21b + "ransitionProperty"] = "none";
this.node.style[_21b + "ransitionDuration"] = "0ms";
this._applyState(this.startState);
},_beforeStart: function() {
if (this.node.style.display === "none") {
this.node.style.display = "";
}
this.beforeStart();
},_beforeClear: function() {
this.node.style[_21b + "ransitionProperty"] = null;
this.node.style[_21b + "ransitionDuration"] = null;
if (this["in"] !== true) {
this.node.style.display = "none";
}
this.beforeClear();
},_onAfterEnd: function() {
this.deferred.resolve(this.node);
if (this.node.id && _21e.playing[this.node.id] === this.deferred) {
delete _21e.playing[this.node.id];
}
this.onAfterEnd();
},beforeStart: function() {
},beforeClear: function() {
},onAfterEnd: function() {
},start: function() {
this._beforeStart();
this._startTime = new Date().getTime();
this._cleared = false;
var self = this;
self.node.style[_21b + "ransitionProperty"] = "all";
self.node.style[_21b + "ransitionDuration"] = self.duration + "ms";
on.once(self.node, _21a, function() {
self.clear();
});
this._applyState(this.endState);
},clear: function() {
if (this._cleared) {
return;
}
this._cleared = true;
this._beforeClear();
this._removeState(this.endState);
this._onAfterEnd();
},_removeState: function(_223) {
var _224 = this.node.style;
for (var _225 in _223) {
if (_223.hasOwnProperty(_225)) {
_224[_225] = null;
}
}
}});
_21e.slide = function(node, _226) {
var ret = new _21e(_226);
ret.node = node;
var _227 = "0";
var endX = "0";
if (ret["in"]) {
if (ret.direction === 1) {
_227 = "100%";
} else {
_227 = "-100%";
}
} else {
if (ret.direction === 1) {
endX = "-100%";
} else {
endX = "100%";
}
}
ret.startState[_21b + "ransform"] = _21c + _227 + _21d;
ret.endState[_21b + "ransform"] = _21c + endX + _21d;
return ret;
};
_21e.fade = function(node, _228) {
var ret = new _21e(_228);
ret.node = node;
var _229 = "0";
var _22a = "0";
if (ret["in"]) {
_22a = "1";
} else {
_229 = "1";
}
lang.mixin(ret, {startState: {"opacity": _229},endState: {"opacity": _22a}});
return ret;
};
_21e.flip = function(node, _22b) {
var ret = new _21e(_22b);
ret.node = node;
if (ret["in"]) {
lang.mixin(ret, {startState: {"opacity": "0"},endState: {"opacity": "1"}});
ret.startState[_21b + "ransform"] = "scale(0,0.8) skew(0,-30deg)";
ret.endState[_21b + "ransform"] = "scale(1,1) skew(0,0)";
} else {
lang.mixin(ret, {startState: {"opacity": "1"},endState: {"opacity": "0"}});
ret.startState[_21b + "ransform"] = "scale(1,1) skew(0,0)";
ret.endState[_21b + "ransform"] = "scale(0,0.8) skew(0,30deg)";
}
return ret;
};
var _22c = function(_22d) {
var defs = [];
_217.forEach(_22d, function(node) {
if (node.id && _21e.playing[node.id]) {
defs.push(_21e.playing[node.id]);
}
});
return new _219(defs);
};
_21e.getWaitingList = _22c;
_21e.groupedPlay = function(args) {
var _22e = _217.filter(args, function(item) {
return item.node;
});
var _22f = _22c(_22e);
_217.forEach(args, function(item) {
if (item.node.id) {
_21e.playing[item.node.id] = item.deferred;
}
});
_218.when(_22f, function() {
_217.forEach(args, function(item) {
item.initState();
});
setTimeout(function() {
_217.forEach(args, function(item) {
item.start();
});
on.once(args[args.length - 1].node, _21a, function() {
var _230;
for (var i = 0; i < args.length - 1; i++) {
if (args[i].deferred.fired !== 0) {
_230 = new Date().getTime() - args[i]._startTime;
if (_230 >= args[i].duration) {
args[i].clear();
}
}
}
});
}, 33);
});
};
_21e.chainedPlay = function(args) {
var _231 = _217.filter(args, function(item) {
return item.node;
});
var _232 = _22c(_231);
_217.forEach(args, function(item) {
if (item.node.id) {
_21e.playing[item.node.id] = item.deferred;
}
});
_218.when(_232, function() {
_217.forEach(args, function(item) {
item.initState();
});
for (var i = 1, len = args.length; i < len; i++) {
args[i - 1].deferred.then(lang.hitch(args[i], function() {
this.start();
}));
}
setTimeout(function() {
args[0].start();
}, 33);
});
};
_21e.playing = {};
return _21e;
});
},"dojox/app/controllers/Layout": function() {
define("dojox/app/controllers/Layout", ["dojo/_base/lang", "dojo/_base/declare", "dojo/sniff", "dojo/on", "dojo/_base/window", "dojo/_base/array", "dojo/_base/config", "dojo/topic", "dojo/query", "dojo/dom-style", "dojo/dom-attr", "dojo/dom-geometry", "dijit/registry", "../Controller", "../layout/utils"], function(lang, _233, has, on, win, _234, _235, _236, _237, _238, _239, _23a, _23b, _23c, _23d) {
return _233("dojox.app.controllers.Layout", _23c, {constructor: function(app, _23e) {
this.events = {"layout": this.layout,"select": this.select};
this.inherited(arguments);
if (_235.mblHideAddressBar) {
_236.subscribe("/dojox/mobile/afterResizeAll", lang.hitch(this, this.onResize));
} else {
this.bind(win.global, has("ios") ? "orientationchange" : "resize", lang.hitch(this, this.onResize));
}
},onResize: function() {
this._doResize(this.app);
},layout: function(_23f) {
var view = _23f.view;
var _240 = _23f.changeSize || null;
var _241 = _23f.resultSize || null;
this._doResize(view, _240, _241);
},_doLayout: function(view) {
if (!view) {
console.warn("layout empty view.");
return;
}
var _242, _243;
if (view.selectedChild && view.selectedChild.isFullScreen) {
console.warn("fullscreen sceen layout");
} else {
_243 = _237("> [data-app-region], > [region]", view.domNode).map(function(node) {
var w = _23b.getEnclosingWidget(node);
if (w) {
w.region = _239.get(node, "data-app-region") || _239.get(node, "region");
return w;
}
return {domNode: node,region: _239.get(node, "data-app-region") || _239.get(node, "region")};
});
if (view.selectedChild) {
_243 = _234.filter(_243, function(c) {
if ((c.region == "center") && view.selectedChild && (view.selectedChild.domNode !== c.domNode)) {
_238.set(c.domNode, "zIndex", 25);
_238.set(c.domNode, "display", "none");
return false;
} else {
if (c.region != "center") {
_238.set(c.domNode, "display", "");
_238.set(c.domNode, "zIndex", 100);
}
}
return c.domNode && c.region;
}, view);
}
}
if (view._contentBox) {
_23d.layoutChildren(view.domNode, view._contentBox, _243);
}
},_doResize: function(view, _244, _245) {
var node = view.domNode;
if (_244) {
_23a.setMarginBox(node, _244);
if (_244.t) {
node.style.top = _244.t + "px";
}
if (_244.l) {
node.style.left = _244.l + "px";
}
}
var mb = _245 || {};
lang.mixin(mb, _244 || {});
if (!("h" in mb) || !("w" in mb)) {
mb = lang.mixin(_23a.getMarginBox(node), mb);
}
if (view !== this.app) {
var cs = _238.getComputedStyle(node);
var me = _23a.getMarginExtents(node, cs);
var be = _23a.getBorderExtents(node, cs);
var bb = (view._borderBox = {w: mb.w - (me.w + be.w),h: mb.h - (me.h + be.h)});
var pe = _23a.getPadExtents(node, cs);
view._contentBox = {l: _238.toPixelValue(node, cs.paddingLeft),t: _238.toPixelValue(node, cs.paddingTop),w: bb.w - pe.w,h: bb.h - pe.h};
} else {
view._contentBox = {l: 0,t: 0,h: win.global.innerHeight || win.doc.documentElement.clientHeight,w: win.global.innerWidth || win.doc.documentElement.clientWidth};
}
this._doLayout(view);
if (view.selectedChild) {
this._doResize(view.selectedChild);
}
},select: function(_246) {
var _247 = _246.parent || this.app;
var view = _246.view;
if (!view) {
return;
}
if (view !== _247.selectedChild) {
if (_247.selectedChild) {
_238.set(_247.selectedChild.domNode, "zIndex", 25);
}
_238.set(view.domNode, "display", "");
_238.set(view.domNode, "zIndex", 50);
_247.selectedChild = view;
}
this._doResize(_247);
}});
});
},"dojox/app/layout/utils": function() {
define("dojox/app/layout/utils", ["dojo/_base/array", "dojo/dom-class", "dojo/dom-geometry", "dojo/dom-style", "dojo/_base/lang"], function(_248, _249, _24a, _24b, lang) {
var _24c = {};
_24c.marginBox2contentBox = function(node, mb) {
var cs = _24b.getComputedStyle(node);
var me = _24a.getMarginExtents(node, cs);
var pb = _24a.getPadBorderExtents(node, cs);
return {l: _24b.toPixelValue(node, cs.paddingLeft),t: _24b.toPixelValue(node, cs.paddingTop),w: mb.w - (me.w + pb.w),h: mb.h - (me.h + pb.h)};
};
function _24d(word) {
return word.substring(0, 1).toUpperCase() + word.substring(1);
}
;
function size(_24e, dim) {
var _24f = _24e.resize ? _24e.resize(dim) : _24a.setMarginBox(_24e.domNode, dim);
if (_24f) {
lang.mixin(_24e, _24f);
} else {
lang.mixin(_24e, _24a.getMarginBox(_24e.domNode));
lang.mixin(_24e, dim);
}
}
;
_24c.layoutChildren = function(_250, dim, _251, _252, _253) {
dim = lang.mixin({}, dim);
_249.add(_250, "dijitLayoutContainer");
_251 = _248.filter(_251, function(item) {
return item.region != "center" && item.layoutAlign != "client";
}).concat(_248.filter(_251, function(item) {
return item.region == "center" || item.layoutAlign == "client";
}));
_248.forEach(_251, function(_254) {
var elm = _254.domNode, pos = (_254.region || _254.layoutAlign);
if (!pos) {
throw new Error("No region setting for " + _254.id);
}
var _255 = elm.style;
_255.left = dim.l + "px";
_255.top = dim.t + "px";
_255.position = "absolute";
_249.add(elm, "dijitAlign" + _24d(pos));
var _256 = {};
if (_252 && _252 == _254.id) {
_256[_254.region == "top" || _254.region == "bottom" ? "h" : "w"] = _253;
}
if (pos == "top" || pos == "bottom") {
_256.w = dim.w;
size(_254, _256);
dim.h -= _254.h;
if (pos == "top") {
dim.t += _254.h;
} else {
_255.top = dim.t + dim.h + "px";
}
} else {
if (pos == "left" || pos == "right") {
_256.h = dim.h;
size(_254, _256);
dim.w -= _254.w;
if (pos == "left") {
dim.l += _254.w;
} else {
_255.left = dim.l + dim.w + "px";
}
} else {
if (pos == "client" || pos == "center") {
size(_254, dim);
}
}
}
});
};
return {marginBox2contentBox: _24c.marginBox2contentBox,layoutChildren: _24c.layoutChildren};
});
},"dojox/json/ref": function() {
define("dojox/json/ref", ["dojo/_base/array", "dojo/_base/json", "dojo/_base/kernel", "dojo/_base/lang", "dojo/date/stamp", "dojox"], function(_257, _258, dojo, lang, _259, _25a) {
lang.getObject("json", true, _25a);
return _25a.json.ref = {resolveJson: function(root, args) {
args = args || {};
var _25b = args.idAttribute || "id";
var _25c = this.refAttribute;
var _25d = args.idAsRef;
var _25e = args.idPrefix || "";
var _25f = args.assignAbsoluteIds;
var _260 = args.index || {};
var _261 = args.timeStamps;
var ref, _262 = [];
var _263 = /^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/;
var _264 = this._addProp;
var F = function() {
};
function walk(it, stop, _265, _266, _267, _268) {
var i, _269, val, id = _25b in it ? it[_25b] : _265;
if (_25b in it || ((id !== undefined) && _266)) {
id = (_25e + id).replace(_263, "$2$3");
}
var _26a = _268 || it;
if (id !== undefined) {
if (_25f) {
it.__id = id;
}
if (args.schemas && (!(it instanceof Array)) && (val = id.match(/^(.+\/)[^\.\[]*$/))) {
_267 = args.schemas[val[1]];
}
if (_260[id] && ((it instanceof Array) == (_260[id] instanceof Array))) {
_26a = _260[id];
delete _26a.$ref;
delete _26a._loadObject;
_269 = true;
} else {
var _26b = _267 && _267.prototype;
if (_26b) {
F.prototype = _26b;
_26a = new F();
}
}
_260[id] = _26a;
if (_261) {
_261[id] = args.time;
}
}
while (_267) {
var _26c = _267.properties;
if (_26c) {
for (i in it) {
var _26d = _26c[i];
if (_26d && _26d.format == "date-time" && typeof it[i] == "string") {
it[i] = _259.fromISOString(it[i]);
}
}
}
_267 = _267["extends"];
}
var _26e = it.length;
for (i in it) {
if (i == _26e) {
break;
}
if (it.hasOwnProperty(i)) {
val = it[i];
if ((typeof val == "object") && val && !(val instanceof Date) && i != "__parent") {
ref = val[_25c] || (_25d && val[_25b]);
if (!ref || !val.__parent) {
if (it != _262) {
val.__parent = _26a;
}
}
if (ref) {
delete it[i];
var path = ref.toString().replace(/(#)([^\.\[])/, "$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);
if (_260[(_25e + ref).replace(_263, "$2$3")]) {
ref = _260[(_25e + ref).replace(_263, "$2$3")];
} else {
if ((ref = (path[1] == "$" || path[1] == "this" || path[1] == "") ? root : _260[(_25e + path[1]).replace(_263, "$2$3")])) {
if (path[3]) {
path[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g, function(t, a, b, c, d) {
ref = ref && ref[b ? b.replace(/[\"\'\\]/, "") : d];
});
}
}
}
if (ref) {
val = ref;
} else {
if (!stop) {
var _26f;
if (!_26f) {
_262.push(_26a);
}
_26f = true;
val = walk(val, false, val[_25c], true, _26d);
val._loadObject = args.loader;
}
}
} else {
if (!stop) {
val = walk(val, _262 == it, id === undefined ? undefined : _264(id, i), false, _26d, _26a != it && typeof _26a[i] == "object" && _26a[i]);
}
}
}
it[i] = val;
if (_26a != it && !_26a.__isDirty) {
var old = _26a[i];
_26a[i] = val;
if (_269 && val !== old && !_26a._loadObject && !(i.charAt(0) == "_" && i.charAt(1) == "_") && i != "$ref" && !(val instanceof Date && old instanceof Date && val.getTime() == old.getTime()) && !(typeof val == "function" && typeof old == "function" && val.toString() == old.toString()) && _260.onUpdate) {
_260.onUpdate(_26a, i, old, val);
}
}
}
}
if (_269 && (_25b in it || _26a instanceof Array)) {
for (i in _26a) {
if (!_26a.__isDirty && _26a.hasOwnProperty(i) && !it.hasOwnProperty(i) && !(i.charAt(0) == "_" && i.charAt(1) == "_") && !(_26a instanceof Array && isNaN(i))) {
if (_260.onUpdate && i != "_loadObject" && i != "_idAttr") {
_260.onUpdate(_26a, i, _26a[i], undefined);
}
delete _26a[i];
while (_26a instanceof Array && _26a.length && _26a[_26a.length - 1] === undefined) {
_26a.length--;
}
}
}
} else {
if (_260.onLoad) {
_260.onLoad(_26a);
}
}
return _26a;
}
;
if (root && typeof root == "object") {
root = walk(root, false, args.defaultId, true);
walk(_262, false);
}
return root;
},fromJson: function(str, args) {
function ref(_270) {
var _271 = {};
_271[this.refAttribute] = _270;
return _271;
}
;
try {
var root = eval("(" + str + ")");
} catch (e) {
throw new SyntaxError("Invalid JSON string: " + e.message + " parsing: " + str);
}
if (root) {
return this.resolveJson(root, args);
}
return root;
},toJson: function(it, _272, _273, _274) {
var _275 = this._useRefs;
var _276 = this._addProp;
var _277 = this.refAttribute;
_273 = _273 || "";
var _278 = {};
var _279 = {};
function _27a(it, path, _27b) {
if (typeof it == "object" && it) {
var _27c;
if (it instanceof Date) {
return "\"" + _259.toISOString(it, {zulu: true}) + "\"";
}
var id = it.__id;
if (id) {
if (path != "#" && ((_275 && !id.match(/#/)) || _278[id])) {
var ref = id;
if (id.charAt(0) != "#") {
if (it.__clientId == id) {
ref = "cid:" + id;
} else {
if (id.substring(0, _273.length) == _273) {
ref = id.substring(_273.length);
} else {
ref = id;
}
}
}
var _27d = {};
_27d[_277] = ref;
return _27a(_27d, "#");
}
path = id;
} else {
it.__id = path;
_279[path] = it;
}
_278[path] = it;
_27b = _27b || "";
var _27e = _272 ? _27b + _258.toJsonIndentStr : "";
var _27f = _272 ? "\n" : "";
var sep = _272 ? " " : "";
if (it instanceof Array) {
var res = _257.map(it, function(obj, i) {
var val = _27a(obj, _276(path, i), _27e);
if (typeof val != "string") {
val = "undefined";
}
return _27f + _27e + val;
});
return "[" + res.join("," + sep) + _27f + _27b + "]";
}
var _280 = [];
for (var i in it) {
if (it.hasOwnProperty(i)) {
var _281;
if (typeof i == "number") {
_281 = "\"" + i + "\"";
} else {
if (typeof i == "string" && (i.charAt(0) != "_" || i.charAt(1) != "_")) {
_281 = _258._escapeString(i);
} else {
continue;
}
}
var val = _27a(it[i], _276(path, i), _27e);
if (typeof val != "string") {
continue;
}
_280.push(_27f + _27e + _281 + ":" + sep + val);
}
}
return "{" + _280.join("," + sep) + _27f + _27b + "}";
} else {
if (typeof it == "function" && _25a.json.ref.serializeFunctions) {
return it.toString();
}
}
return _258.toJson(it);
}
;
var json = _27a(it, "#", "");
if (!_274) {
for (var i in _279) {
delete _279[i].__id;
}
}
return json;
},_addProp: function(id, prop) {
return id + (id.match(/#/) ? id.length == 1 ? "" : "." : "#") + prop;
},refAttribute: "$ref",_useRefs: false,serializeFunctions: false};
});
},"dojox/main": function() {
define("dojox/main", ["dojo/_base/kernel"], function(dojo) {
return dojo.dojox;
});
},"dojox/mobile/_base": function() {
define("dojox/mobile/_base", ["./common", "./View", "./Heading", "./RoundRect", "./RoundRectCategory", "./EdgeToEdgeCategory", "./RoundRectList", "./EdgeToEdgeList", "./ListItem", "./Container", "./Pane", "./Switch", "./ToolBarButton", "./ProgressIndicator"], function(_282, View, _283, _284, _285, _286, _287, _288, _289, _28a, _28b, _28c) {
return _282;
});
},"dojox/mobile/common": function() {
define("dojox/mobile/common", ["dojo/_base/array", "dojo/_base/config", "dojo/_base/connect", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/ready", "dijit/registry", "./sniff", "./uacss"], function(_28d, _28e, _28f, lang, win, _290, _291, _292, _293, has) {
var dm = lang.getObject("dojox.mobile", true);
dm.getScreenSize = function() {
return {h: win.global.innerHeight || win.doc.documentElement.clientHeight,w: win.global.innerWidth || win.doc.documentElement.clientWidth};
};
dm.updateOrient = function() {
var dim = dm.getScreenSize();
_290.replace(win.doc.documentElement, dim.h > dim.w ? "dj_portrait" : "dj_landscape", dim.h > dim.w ? "dj_landscape" : "dj_portrait");
};
dm.updateOrient();
dm.tabletSize = 500;
dm.detectScreenSize = function(_294) {
var dim = dm.getScreenSize();
var sz = Math.min(dim.w, dim.h);
var from, to;
if (sz >= dm.tabletSize && (_294 || (!this._sz || this._sz < dm.tabletSize))) {
from = "phone";
to = "tablet";
} else {
if (sz < dm.tabletSize && (_294 || (!this._sz || this._sz >= dm.tabletSize))) {
from = "tablet";
to = "phone";
}
}
if (to) {
_290.replace(win.doc.documentElement, "dj_" + to, "dj_" + from);
_28f.publish("/dojox/mobile/screenSize/" + to, [dim]);
}
this._sz = sz;
};
dm.detectScreenSize();
dm.hideAddressBarWait = typeof (_28e["mblHideAddressBarWait"]) === "number" ? _28e["mblHideAddressBarWait"] : 1500;
dm.hide_1 = function() {
scrollTo(0, 1);
dm._hidingTimer = (dm._hidingTimer == 0) ? 200 : dm._hidingTimer * 2;
setTimeout(function() {
if (dm.isAddressBarHidden() || dm._hidingTimer > dm.hideAddressBarWait) {
dm.resizeAll();
dm._hiding = false;
} else {
setTimeout(dm.hide_1, dm._hidingTimer);
}
}, 50);
};
dm.hideAddressBar = function(evt) {
if (dm.disableHideAddressBar || dm._hiding) {
return;
}
dm._hiding = true;
dm._hidingTimer = has("iphone") ? 200 : 0;
var minH = screen.availHeight;
if (has("android")) {
minH = outerHeight / devicePixelRatio;
if (minH == 0) {
dm._hiding = false;
setTimeout(function() {
dm.hideAddressBar();
}, 200);
}
if (minH <= innerHeight) {
minH = outerHeight;
}
if (has("android") < 3) {
win.doc.documentElement.style.overflow = win.body().style.overflow = "visible";
}
}
if (win.body().offsetHeight < minH) {
win.body().style.minHeight = minH + "px";
dm._resetMinHeight = true;
}
setTimeout(dm.hide_1, dm._hidingTimer);
};
dm.isAddressBarHidden = function() {
return pageYOffset === 1;
};
dm.resizeAll = function(evt, root) {
if (dm.disableResizeAll) {
return;
}
_28f.publish("/dojox/mobile/resizeAll", [evt, root]);
_28f.publish("/dojox/mobile/beforeResizeAll", [evt, root]);
if (dm._resetMinHeight) {
win.body().style.minHeight = dm.getScreenSize().h + "px";
}
dm.updateOrient();
dm.detectScreenSize();
var _295 = function(w) {
var _296 = w.getParent && w.getParent();
return !!((!_296 || !_296.resize) && w.resize);
};
var _297 = function(w) {
_28d.forEach(w.getChildren(), function(_298) {
if (_295(_298)) {
_298.resize();
}
_297(_298);
});
};
if (root) {
if (root.resize) {
root.resize();
}
_297(root);
} else {
_28d.forEach(_28d.filter(_293.toArray(), _295), function(w) {
w.resize();
});
}
_28f.publish("/dojox/mobile/afterResizeAll", [evt, root]);
};
dm.openWindow = function(url, _299) {
win.global.open(url, _299 || "_blank");
};
if (_28e["mblApplyPageStyles"] !== false) {
_290.add(win.doc.documentElement, "mobile");
}
if (has("chrome")) {
_290.add(win.doc.documentElement, "dj_chrome");
}
if (win.global._no_dojo_dm) {
var _29a = win.global._no_dojo_dm;
for (var i in _29a) {
dm[i] = _29a[i];
}
dm.deviceTheme.setDm(dm);
}
has.add("mblAndroidWorkaround", _28e["mblAndroidWorkaround"] !== false && has("android") < 3, undefined, true);
has.add("mblAndroid3Workaround", _28e["mblAndroid3Workaround"] !== false && has("android") >= 3, undefined, true);
_292(function() {
dm.detectScreenSize(true);
if (_28e["mblAndroidWorkaroundButtonStyle"] !== false && has("android")) {
_291.create("style", {innerHTML: "BUTTON,INPUT[type='button'],INPUT[type='submit'],INPUT[type='reset'],INPUT[type='file']::-webkit-file-upload-button{-webkit-appearance:none;}"}, win.doc.head, "first");
}
if (has("mblAndroidWorkaround")) {
_291.create("style", {innerHTML: ".mblView.mblAndroidWorkaround{position:absolute;top:-9999px !important;left:-9999px !important;}"}, win.doc.head, "last");
}
var f = dm.resizeAll;
if (_28e["mblHideAddressBar"] !== false && navigator.appVersion.indexOf("Mobile") != -1 || _28e["mblForceHideAddressBar"] === true) {
dm.hideAddressBar();
if (_28e["mblAlwaysHideAddressBar"] === true) {
f = dm.hideAddressBar;
}
}
var ios6 = has("iphone") >= 6;
if ((has("android") || ios6) && win.global.onorientationchange !== undefined) {
var _29b = f;
f = function(evt) {
var _29c = _28f.connect(null, "onresize", null, function(e) {
_28f.disconnect(_29c);
_29b(e);
});
};
var _29d = dm.getScreenSize();
var _29e = ios6 ? 20 : 100;
var _29f = null;
var _2a0 = null;
if (ios6) {
_28f.connect(null, "onkeyup", null, function(e) {
_29f = (new Date()).getTime();
});
_2a0 = function(node) {
if (node && node.nodeType !== 1) {
node = node.parentNode;
}
if (!node || node.nodeType !== 1) {
return false;
}
var t = node.tagName;
return (t === "SELECT" || t === "INPUT" || t === "TEXTAREA" || t === "BUTTON");
};
}
_28f.connect(null, "onresize", null, function(e) {
var _2a1 = dm.getScreenSize();
if (_2a1.w == _29d.w && Math.abs(_2a1.h - _29d.h) >= _29e && !(ios6 && ((_29f && ((new Date()).getTime() - _29f) < 400) || _2a0(win.doc.activeElement)))) {
if (ios6 && pageYOffset > 1) {
dm.resizeAll();
} else {
_29b(e);
}
}
_29d = _2a1;
});
}
_28f.connect(null, win.global.onorientationchange !== undefined ? "onorientationchange" : "onresize", null, f);
win.body().style.visibility = "visible";
});
return dm;
});
},"dojox/mobile/sniff": function() {
define("dojox/mobile/sniff", ["dojo/_base/window", "dojo/_base/sniff"], function(win, has) {
var ua = navigator.userAgent;
has.add("bb", (ua.indexOf("BlackBerry") >= 0 || ua.indexOf("BB10")) && parseFloat(ua.split("Version/")[1]) || undefined, undefined, true);
has.add("android", parseFloat(ua.split("Android ")[1]) || undefined, undefined, true);
if (ua.match(/(iPhone|iPod|iPad)/)) {
var p = RegExp.$1.replace(/P/, "p");
var v = ua.match(/OS ([\d_]+)/) ? RegExp.$1 : "1";
var os = parseFloat(v.replace(/_/, ".").replace(/_/g, ""));
has.add(p, os, undefined, true);
has.add("iphone", os, undefined, true);
}
if (has("webkit")) {
has.add("touch", (typeof win.doc.documentElement.ontouchstart != "undefined" && navigator.appVersion.indexOf("Mobile") != -1) || !!has("android"), undefined, true);
}
return has;
});
},"dojox/mobile/uacss": function() {
define("dojox/mobile/uacss", ["dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/window", "./sniff"], function(dojo, lang, win, has) {
var html = win.doc.documentElement;
html.className = lang.trim(html.className + " " + [has("bb") ? "dj_bb" : "", has("android") ? "dj_android" : "", has("iphone") ? "dj_iphone" : "", has("ipod") ? "dj_ipod" : "", has("ipad") ? "dj_ipad" : ""].join(" ").replace(/ +/g, " "));
return dojo;
});
},"dojox/mobile/View": function() {
define("dojox/mobile/View", ["dojo/_base/array", "dojo/_base/config", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/_base/Deferred", "dojo/dom", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-geometry", "dojo/dom-style", "dijit/registry", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase", "./ViewController", "./common", "./transition", "./viewRegistry"], function(_2a2, _2a3, _2a4, _2a5, lang, has, win, _2a6, dom, _2a7, _2a8, _2a9, _2aa, _2ab, _2ac, _2ad, _2ae, _2af, _2b0, _2b1, _2b2) {
var dm = lang.getObject("dojox.mobile", true);
return _2a5("dojox.mobile.View", [_2ae, _2ad, _2ac], {selected: false,keepScrollPos: true,tag: "div",baseClass: "mblView",constructor: function(_2b3, node) {
if (node) {
dom.byId(node).style.visibility = "hidden";
}
},destroy: function() {
_2b2.remove(this.id);
this.inherited(arguments);
},buildRendering: function() {
this.domNode = this.containerNode = this.srcNodeRef || _2a8.create(this.tag);
this._animEndHandle = this.connect(this.domNode, "webkitAnimationEnd", "onAnimationEnd");
this._animStartHandle = this.connect(this.domNode, "webkitAnimationStart", "onAnimationStart");
if (!_2a3["mblCSS3Transition"]) {
this._transEndHandle = this.connect(this.domNode, "webkitTransitionEnd", "onAnimationEnd");
}
if (has("mblAndroid3Workaround")) {
_2aa.set(this.domNode, "webkitTransformStyle", "preserve-3d");
}
_2b2.add(this);
this.inherited(arguments);
},startup: function() {
if (this._started) {
return;
}
if (this._visible === undefined) {
var _2b4 = this.getSiblingViews();
var ids = location.hash && location.hash.substring(1).split(/,/);
var _2b5, _2b6, _2b7;
_2a2.forEach(_2b4, function(v, i) {
if (_2a2.indexOf(ids, v.id) !== -1) {
_2b5 = v;
}
if (i == 0) {
_2b7 = v;
}
if (v.selected) {
_2b6 = v;
}
v._visible = false;
}, this);
(_2b5 || _2b6 || _2b7)._visible = true;
}
if (this._visible) {
this.show(true, true);
this.defer(function() {
this.onStartView();
_2a4.publish("/dojox/mobile/startView", [this]);
});
}
if (this.domNode.style.visibility != "visible") {
this.domNode.style.visibility = "visible";
}
this.inherited(arguments);
var _2b8 = this.getParent();
if (!_2b8 || !_2b8.resize) {
this.resize();
}
if (!this._visible) {
this.hide();
}
},resize: function() {
_2a2.forEach(this.getChildren(), function(_2b9) {
if (_2b9.resize) {
_2b9.resize();
}
});
},onStartView: function() {
},onBeforeTransitionIn: function(_2ba, dir, _2bb, _2bc, _2bd) {
},onAfterTransitionIn: function(_2be, dir, _2bf, _2c0, _2c1) {
},onBeforeTransitionOut: function(_2c2, dir, _2c3, _2c4, _2c5) {
},onAfterTransitionOut: function(_2c6, dir, _2c7, _2c8, _2c9) {
},_clearClasses: function(node) {
if (!node) {
return;
}
var _2ca = [];
_2a2.forEach(lang.trim(node.className || "").split(/\s+/), function(c) {
if (c.match(/^mbl\w*View$/) || c.indexOf("mbl") === -1) {
_2ca.push(c);
}
}, this);
node.className = _2ca.join(" ");
},_fixViewState: function(_2cb) {
var _2cc = this.domNode.parentNode.childNodes;
for (var i = 0; i < _2cc.length; i++) {
var n = _2cc[i];
if (n.nodeType === 1 && _2a7.contains(n, "mblView")) {
this._clearClasses(n);
}
}
this._clearClasses(_2cb);
},convertToId: function(_2cd) {
if (typeof (_2cd) == "string") {
return _2cd.replace(/^#?([^&?]+).*/, "$1");
}
return _2cd;
},_isBookmarkable: function(_2ce) {
return _2ce.moveTo && (_2a3["mblForceBookmarkable"] || _2ce.moveTo.charAt(0) === "#") && !_2ce.hashchange;
},performTransition: function(_2cf, _2d0, _2d1, _2d2, _2d3) {
if (this._detail) {
return;
}
var _2d4, _2d5;
if (_2cf && typeof (_2cf) === "object") {
_2d4 = _2cf;
_2d5 = _2d0;
} else {
_2d4 = {moveTo: _2cf,transitionDir: _2d0,transition: _2d1,context: _2d2,method: _2d3};
_2d5 = [];
for (var i = 5; i < arguments.length; i++) {
_2d5.push(arguments[i]);
}
}
this._detail = _2d4;
this._optArgs = _2d5;
this._arguments = [_2d4.moveTo, _2d4.transitionDir, _2d4.transition, _2d4.context, _2d4.method];
if (_2d4.moveTo === "#") {
return;
}
var _2d6;
if (_2d4.moveTo) {
_2d6 = this.convertToId(_2d4.moveTo);
} else {
if (!this._dummyNode) {
this._dummyNode = win.doc.createElement("div");
win.body().appendChild(this._dummyNode);
}
_2d6 = this._dummyNode;
}
if (this.addTransitionInfo && typeof (_2d4.moveTo) == "string" && this._isBookmarkable(_2d4)) {
this.addTransitionInfo(this.id, _2d4.moveTo, {transitionDir: _2d4.transitionDir,transition: _2d4.transition});
}
var _2d7 = this.domNode;
var _2d8 = _2d7.offsetTop;
_2d6 = this.toNode = dom.byId(_2d6);
if (!_2d6) {
return;
}
_2d6.style.visibility = "hidden";
_2d6.style.display = "";
this._fixViewState(_2d6);
var _2d9 = _2ab.byNode(_2d6);
if (_2d9) {
if (_2a3["mblAlwaysResizeOnTransition"] || !_2d9._resized) {
_2b0.resizeAll(null, _2d9);
_2d9._resized = true;
}
if (_2d4.transition && _2d4.transition != "none") {
_2d9.containerNode.style.paddingTop = _2d8 + "px";
}
_2d9.load && _2d9.load();
_2d9.movedFrom = _2d7.id;
}
if (has("mblAndroidWorkaround") && !_2a3["mblCSS3Transition"] && _2d4.transition && _2d4.transition != "none") {
_2aa.set(_2d6, "webkitTransformStyle", "preserve-3d");
_2aa.set(_2d7, "webkitTransformStyle", "preserve-3d");
_2a7.add(_2d6, "mblAndroidWorkaround");
}
this.onBeforeTransitionOut.apply(this, this._arguments);
_2a4.publish("/dojox/mobile/beforeTransitionOut", [this].concat(lang._toArray(this._arguments)));
if (_2d9) {
if (this.keepScrollPos && !this.getParent()) {
var _2da = win.body().scrollTop || win.doc.documentElement.scrollTop || win.global.pageYOffset || 0;
_2d7._scrollTop = _2da;
var _2db = (_2d4.transitionDir == 1) ? 0 : (_2d6._scrollTop || 0);
_2d6.style.top = "0px";
if (_2da > 1 || _2db !== 0) {
_2d7.style.top = _2db - _2da + "px";
if (_2a3["mblHideAddressBar"] !== false) {
setTimeout(function() {
win.global.scrollTo(0, (_2db || 1));
}, 0);
}
}
} else {
_2d6.style.top = "0px";
}
_2d9.onBeforeTransitionIn.apply(_2d9, this._arguments);
_2a4.publish("/dojox/mobile/beforeTransitionIn", [_2d9].concat(lang._toArray(this._arguments)));
}
_2d6.style.display = "none";
_2d6.style.visibility = "visible";
_2b0.fromView = this;
_2b0.toView = _2d9;
this._doTransition(_2d7, _2d6, _2d4.transition, _2d4.transitionDir);
},_toCls: function(s) {
return "mbl" + s.charAt(0).toUpperCase() + s.substring(1);
},_doTransition: function(_2dc, _2dd, _2de, _2df) {
var rev = (_2df == -1) ? " mblReverse" : "";
_2dd.style.display = "";
if (!_2de || _2de == "none") {
this.domNode.style.display = "none";
this.invokeCallback();
} else {
if (_2a3["mblCSS3Transition"]) {
_2a6.when(_2b1, lang.hitch(this, function(_2e0) {
var _2e1 = _2aa.get(_2dd, "position");
_2aa.set(_2dd, "position", "absolute");
_2a6.when(_2e0(_2dc, _2dd, {transition: _2de,reverse: (_2df === -1) ? true : false}), lang.hitch(this, function() {
_2aa.set(_2dd, "position", _2e1);
this.invokeCallback();
}));
}));
} else {
if (_2de.indexOf("cube") != -1) {
if (has("ipad")) {
_2aa.set(_2dd.parentNode, {webkitPerspective: 1600});
} else {
if (has("iphone")) {
_2aa.set(_2dd.parentNode, {webkitPerspective: 800});
}
}
}
var s = this._toCls(_2de);
if (has("mblAndroidWorkaround")) {
setTimeout(function() {
_2a7.add(_2dc, s + " mblOut" + rev);
_2a7.add(_2dd, s + " mblIn" + rev);
_2a7.remove(_2dd, "mblAndroidWorkaround");
setTimeout(function() {
_2a7.add(_2dc, "mblTransition");
_2a7.add(_2dd, "mblTransition");
}, 30);
}, 70);
} else {
_2a7.add(_2dc, s + " mblOut" + rev);
_2a7.add(_2dd, s + " mblIn" + rev);
setTimeout(function() {
_2a7.add(_2dc, "mblTransition");
_2a7.add(_2dd, "mblTransition");
}, 100);
}
var _2e2 = "50% 50%";
var _2e3 = "50% 50%";
var _2e4, posX, posY;
if (_2de.indexOf("swirl") != -1 || _2de.indexOf("zoom") != -1) {
if (this.keepScrollPos && !this.getParent()) {
_2e4 = win.body().scrollTop || win.doc.documentElement.scrollTop || win.global.pageYOffset || 0;
} else {
_2e4 = -_2a9.position(_2dc, true).y;
}
posY = win.global.innerHeight / 2 + _2e4;
_2e2 = "50% " + posY + "px";
_2e3 = "50% " + posY + "px";
} else {
if (_2de.indexOf("scale") != -1) {
var _2e5 = _2a9.position(_2dc, true);
posX = ((this.clickedPosX !== undefined) ? this.clickedPosX : win.global.innerWidth / 2) - _2e5.x;
if (this.keepScrollPos && !this.getParent()) {
_2e4 = win.body().scrollTop || win.doc.documentElement.scrollTop || win.global.pageYOffset || 0;
} else {
_2e4 = -_2e5.y;
}
posY = ((this.clickedPosY !== undefined) ? this.clickedPosY : win.global.innerHeight / 2) + _2e4;
_2e2 = posX + "px " + posY + "px";
_2e3 = posX + "px " + posY + "px";
}
}
_2aa.set(_2dc, {webkitTransformOrigin: _2e2});
_2aa.set(_2dd, {webkitTransformOrigin: _2e3});
}
}
},onAnimationStart: function(e) {
},onAnimationEnd: function(e) {
var name = e.animationName || e.target.className;
if (name.indexOf("Out") === -1 && name.indexOf("In") === -1 && name.indexOf("Shrink") === -1) {
return;
}
var _2e6 = false;
if (_2a7.contains(this.domNode, "mblOut")) {
_2e6 = true;
this.domNode.style.display = "none";
_2a7.remove(this.domNode, [this._toCls(this._detail.transition), "mblIn", "mblOut", "mblReverse"]);
} else {
this.containerNode.style.paddingTop = "";
}
_2aa.set(this.domNode, {webkitTransformOrigin: ""});
if (name.indexOf("Shrink") !== -1) {
var li = e.target;
li.style.display = "none";
_2a7.remove(li, "mblCloseContent");
var p = _2b2.getEnclosingScrollable(this.domNode);
p && p.onTouchEnd();
}
if (_2e6) {
this.invokeCallback();
}
this._clearClasses(this.domNode);
this.clickedPosX = this.clickedPosY = undefined;
if (name.indexOf("Cube") !== -1 && name.indexOf("In") !== -1 && has("iphone")) {
this.domNode.parentNode.style.webkitPerspective = "";
}
},invokeCallback: function() {
this.onAfterTransitionOut.apply(this, this._arguments);
_2a4.publish("/dojox/mobile/afterTransitionOut", [this].concat(this._arguments));
var _2e7 = _2ab.byNode(this.toNode);
if (_2e7) {
_2e7.onAfterTransitionIn.apply(_2e7, this._arguments);
_2a4.publish("/dojox/mobile/afterTransitionIn", [_2e7].concat(this._arguments));
_2e7.movedFrom = undefined;
if (this.setFragIds && this._isBookmarkable(this._detail)) {
this.setFragIds(_2e7);
}
}
if (has("mblAndroidWorkaround")) {
setTimeout(lang.hitch(this, function() {
if (_2e7) {
_2aa.set(this.toNode, "webkitTransformStyle", "");
}
_2aa.set(this.domNode, "webkitTransformStyle", "");
}), 0);
}
var c = this._detail.context, m = this._detail.method;
if (c || m) {
if (!m) {
m = c;
c = null;
}
c = c || win.global;
if (typeof (m) == "string") {
c[m].apply(c, this._optArgs);
} else {
if (typeof (m) == "function") {
m.apply(c, this._optArgs);
}
}
}
this._detail = this._optArgs = this._arguments = undefined;
},isVisible: function(_2e8) {
var _2e9 = function(node) {
return _2aa.get(node, "display") !== "none";
};
if (_2e8) {
for (var n = this.domNode; n.tagName !== "BODY"; n = n.parentNode) {
if (!_2e9(n)) {
return false;
}
}
return true;
} else {
return _2e9(this.domNode);
}
},getShowingView: function() {
var _2ea = this.domNode.parentNode.childNodes;
for (var i = 0; i < _2ea.length; i++) {
var n = _2ea[i];
if (n.nodeType === 1 && _2a7.contains(n, "mblView") && n.style.display !== "none") {
return _2ab.byNode(n);
}
}
return null;
},getSiblingViews: function() {
if (!this.domNode.parentNode) {
return [this];
}
return _2a2.map(_2a2.filter(this.domNode.parentNode.childNodes, function(n) {
return n.nodeType === 1 && _2a7.contains(n, "mblView");
}), function(n) {
return _2ab.byNode(n);
});
},show: function(_2eb, _2ec) {
var out = this.getShowingView();
if (!_2eb) {
if (out) {
out.onBeforeTransitionOut(out.id);
_2a4.publish("/dojox/mobile/beforeTransitionOut", [out, out.id]);
}
this.onBeforeTransitionIn(this.id);
_2a4.publish("/dojox/mobile/beforeTransitionIn", [this, this.id]);
}
if (_2ec) {
this.domNode.style.display = "";
} else {
_2a2.forEach(this.getSiblingViews(), function(v) {
v.domNode.style.display = (v === this) ? "" : "none";
}, this);
}
this.load && this.load();
if (!_2eb) {
if (out) {
out.onAfterTransitionOut(out.id);
_2a4.publish("/dojox/mobile/afterTransitionOut", [out, out.id]);
}
this.onAfterTransitionIn(this.id);
_2a4.publish("/dojox/mobile/afterTransitionIn", [this, this.id]);
}
},hide: function() {
this.domNode.style.display = "none";
}});
});
},"dijit/_Contained": function() {
define("dijit/_Contained", ["dojo/_base/declare", "./registry"], function(_2ed, _2ee) {
return _2ed("dijit._Contained", null, {_getSibling: function(_2ef) {
var node = this.domNode;
do {
node = node[_2ef + "Sibling"];
} while (node && node.nodeType != 1);
return node && _2ee.byNode(node);
},getPreviousSibling: function() {
return this._getSibling("previous");
},getNextSibling: function() {
return this._getSibling("next");
},getIndexInParent: function() {
var p = this.getParent();
if (!p || !p.getIndexOfChild) {
return -1;
}
return p.getIndexOfChild(this);
}});
});
},"dijit/_Container": function() {
define("dijit/_Container", ["dojo/_base/array", "dojo/_base/declare", "dojo/dom-construct"], function(_2f0, _2f1, _2f2) {
return _2f1("dijit._Container", null, {buildRendering: function() {
this.inherited(arguments);
if (!this.containerNode) {
this.containerNode = this.domNode;
}
},addChild: function(_2f3, _2f4) {
var _2f5 = this.containerNode;
if (_2f4 && typeof _2f4 == "number") {
var _2f6 = this.getChildren();
if (_2f6 && _2f6.length >= _2f4) {
_2f5 = _2f6[_2f4 - 1].domNode;
_2f4 = "after";
}
}
_2f2.place(_2f3.domNode, _2f5, _2f4);
if (this._started && !_2f3._started) {
_2f3.startup();
}
},removeChild: function(_2f7) {
if (typeof _2f7 == "number") {
_2f7 = this.getChildren()[_2f7];
}
if (_2f7) {
var node = _2f7.domNode;
if (node && node.parentNode) {
node.parentNode.removeChild(node);
}
}
},hasChildren: function() {
return this.getChildren().length > 0;
},_getSiblingOfChild: function(_2f8, dir) {
var _2f9 = this.getChildren(), idx = _2f0.indexOf(this.getChildren(), _2f8);
return _2f9[idx + dir];
},getIndexOfChild: function(_2fa) {
return _2f0.indexOf(this.getChildren(), _2fa);
}});
});
},"dojox/mobile/ViewController": function() {
define("dojox/mobile/ViewController", ["dojo/_base/kernel", "dojo/_base/array", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/_base/Deferred", "dojo/dom", "dojo/dom-class", "dojo/dom-construct", "dojo/on", "dojo/ready", "dijit/registry", "./ProgressIndicator", "./TransitionEvent", "./viewRegistry"], function(dojo, _2fb, _2fc, _2fd, lang, win, _2fe, dom, _2ff, _300, on, _301, _302, _303, _304, _305) {
var _306 = _2fd("dojox.mobile.ViewController", null, {dataHandlerClass: "dojox/mobile/dh/DataHandler",dataSourceClass: "dojox/mobile/dh/UrlDataSource",fileTypeMapClass: "dojox/mobile/dh/SuffixFileTypeMap",constructor: function() {
this.viewMap = {};
_301(lang.hitch(this, function() {
on(win.body(), "startTransition", lang.hitch(this, "onStartTransition"));
}));
},findTransitionViews: function(_307) {
if (!_307) {
return [];
}
_307.match(/^#?([^&?]+)(.*)/);
var _308 = RegExp.$2;
var view = _302.byId(RegExp.$1);
if (!view) {
return [];
}
for (var v = view.getParent(); v; v = v.getParent()) {
if (v.isVisible && !v.isVisible()) {
var sv = view.getShowingView();
if (sv && sv.id !== view.id) {
view.show();
}
view = v;
}
}
return [view.getShowingView(), view, _308];
},openExternalView: function(_309, _30a) {
var d = new _2fe();
var id = this.viewMap[_309.url];
if (id) {
_309.moveTo = id;
if (_309.noTransition) {
_302.byId(id).hide();
} else {
new _304(win.body(), _309).dispatch();
}
d.resolve(true);
return d;
}
var _30b = null;
for (var i = _30a.childNodes.length - 1; i >= 0; i--) {
var c = _30a.childNodes[i];
if (c.nodeType === 1) {
var _30c = c.getAttribute("fixed") || (_302.byNode(c) && _302.byNode(c).fixed);
if (_30c === "bottom") {
_30b = c;
break;
}
}
}
var dh = _309.dataHandlerClass || this.dataHandlerClass;
var ds = _309.dataSourceClass || this.dataSourceClass;
var ft = _309.fileTypeMapClass || this.fileTypeMapClass;
require([dh, ds, ft], lang.hitch(this, function(_30d, _30e, _30f) {
var _310 = new _30d(new _30e(_309.data || _309.url), _30a, _30b);
var _311 = _309.contentType || _30f.getContentType(_309.url) || "html";
_310.processData(_311, lang.hitch(this, function(id) {
if (id) {
this.viewMap[_309.url] = _309.moveTo = id;
if (_309.noTransition) {
_302.byId(id).hide();
} else {
new _304(win.body(), _309).dispatch();
}
d.resolve(true);
} else {
d.reject("Failed to load " + _309.url);
}
}));
}));
return d;
},onStartTransition: function(evt) {
evt.preventDefault();
if (!evt.detail) {
return;
}
var _312 = evt.detail;
if (!_312.moveTo && !_312.href && !_312.url && !_312.scene) {
return;
}
if (_312.url && !_312.moveTo) {
var _313 = _312.urlTarget;
var w = _302.byId(_313);
var _314 = w && w.containerNode || dom.byId(_313);
if (!_314) {
w = _305.getEnclosingView(evt.target);
_314 = w && w.domNode.parentNode || win.body();
}
this.openExternalView(_312, _314);
return;
} else {
if (_312.href) {
if (_312.hrefTarget) {
win.global.open(_312.href, _312.hrefTarget);
} else {
var view;
for (var v = _305.getEnclosingView(evt.target); v; v = _305.getParentView(v)) {
view = v;
}
if (view) {
view.performTransition(null, _312.transitionDir, _312.transition, evt.target, function() {
location.href = _312.href;
});
}
}
return;
} else {
if (_312.scene) {
_2fc.publish("/dojox/mobile/app/pushScene", [_312.scene]);
return;
}
}
}
var arr = this.findTransitionViews(_312.moveTo), _315 = arr[0], _316 = arr[1], _317 = arr[2];
if (!location.hash && !_312.hashchange) {
_305.initialView = _315;
}
if (_312.moveTo && _316) {
_312.moveTo = (_312.moveTo.charAt(0) === "#" ? "#" + _316.id : _316.id) + _317;
}
if (!_315 || (_312.moveTo && _315 === _302.byId(_312.moveTo.replace(/^#?([^&?]+).*/, "$1")))) {
return;
}
var src = _302.getEnclosingWidget(evt.target);
if (src && src.callback) {
_312.context = src;
_312.method = src.callback;
}
_315.performTransition(_312);
}});
_306._instance = new _306();
_306.getInstance = function() {
return _306._instance;
};
return _306;
});
},"dojox/mobile/ProgressIndicator": function() {
define("dojox/mobile/ProgressIndicator", ["dojo/_base/config", "dojo/_base/declare", "dojo/_base/lang", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-geometry", "dojo/dom-style", "dojo/has", "dijit/_Contained", "dijit/_WidgetBase"], function(_318, _319, lang, _31a, _31b, _31c, _31d, has, _31e, _31f) {
var cls = _319("dojox.mobile.ProgressIndicator", [_31f, _31e], {interval: 100,size: 40,removeOnStop: true,startSpinning: false,center: true,colors: null,baseClass: "mblProgressIndicator",constructor: function() {
this.colors = [];
this._bars = [];
},buildRendering: function() {
this.inherited(arguments);
if (this.center) {
_31a.add(this.domNode, "mblProgressIndicatorCenter");
}
this.containerNode = _31b.create("div", {className: "mblProgContainer"}, this.domNode);
this.spinnerNode = _31b.create("div", null, this.containerNode);
for (var i = 0; i < 12; i++) {
var div = _31b.create("div", {className: "mblProg mblProg" + i}, this.spinnerNode);
this._bars.push(div);
}
this.scale(this.size);
if (this.startSpinning) {
this.start();
}
},scale: function(size) {
var _320 = size / 40;
_31d.set(this.containerNode, {webkitTransform: "scale(" + _320 + ")",webkitTransformOrigin: "0 0"});
_31c.setMarginBox(this.domNode, {w: size,h: size});
_31c.setMarginBox(this.containerNode, {w: size / _320,h: size / _320});
},start: function() {
if (this.imageNode) {
var img = this.imageNode;
var l = Math.round((this.containerNode.offsetWidth - img.offsetWidth) / 2);
var t = Math.round((this.containerNode.offsetHeight - img.offsetHeight) / 2);
img.style.margin = t + "px " + l + "px";
return;
}
var cntr = 0;
var _321 = this;
var n = 12;
this.timer = setInterval(function() {
cntr--;
cntr = cntr < 0 ? n - 1 : cntr;
var c = _321.colors;
for (var i = 0; i < n; i++) {
var idx = (cntr + i) % n;
if (c[idx]) {
_321._bars[i].style.backgroundColor = c[idx];
} else {
_31a.replace(_321._bars[i], "mblProg" + idx + "Color", "mblProg" + (idx === n - 1 ? 0 : idx + 1) + "Color");
}
}
}, this.interval);
},stop: function() {
if (this.timer) {
clearInterval(this.timer);
}
this.timer = null;
if (this.removeOnStop && this.domNode && this.domNode.parentNode) {
this.domNode.parentNode.removeChild(this.domNode);
}
},setImage: function(file) {
if (file) {
this.imageNode = _31b.create("img", {src: file}, this.containerNode);
this.spinnerNode.style.display = "none";
} else {
if (this.imageNode) {
this.containerNode.removeChild(this.imageNode);
this.imageNode = null;
}
this.spinnerNode.style.display = "";
}
},destroy: function() {
this.inherited(arguments);
if (this === cls._instance) {
cls._instance = null;
}
}});
cls._instance = null;
cls.getInstance = function(_322) {
if (!cls._instance) {
cls._instance = new cls(_322);
}
return cls._instance;
};
return cls;
});
},"dojox/mobile/TransitionEvent": function() {
define("dojox/mobile/TransitionEvent", ["dojo/_base/declare", "dojo/_base/Deferred", "dojo/_base/lang", "dojo/on", "./transition"], function(_323, _324, lang, on, _325) {
return _323("dojox.mobile.TransitionEvent", null, {constructor: function(_326, _327, _328) {
this.transitionOptions = _327;
this.target = _326;
this.triggerEvent = _328 || null;
},dispatch: function() {
var opts = {bubbles: true,cancelable: true,detail: this.transitionOptions,triggerEvent: this.triggerEvent};
var evt = on.emit(this.target, "startTransition", opts);
if (evt) {
_324.when(_325, lang.hitch(this, function(_329) {
_324.when(_329.call(this, evt), lang.hitch(this, function(_32a) {
this.endTransition(_32a);
}));
}));
}
},endTransition: function(_32b) {
on.emit(this.target, "endTransition", {detail: _32b.transitionOptions});
}});
});
},"dojox/mobile/transition": function() {
define("dojox/mobile/transition", ["dojo/_base/Deferred", "dojo/_base/config"], function(_32c, _32d) {
if (_32d["mblCSS3Transition"]) {
var _32e = new _32c();
require([_32d["mblCSS3Transition"]], function(_32f) {
_32e.resolve(_32f);
});
return _32e;
}
return null;
});
},"dojox/mobile/viewRegistry": function() {
define("dojox/mobile/viewRegistry", ["dojo/_base/array", "dojo/dom-class", "dijit/registry"], function(_330, _331, _332) {
var _333 = {length: 0,hash: {},initialView: null,add: function(view) {
this.hash[view.id] = view;
this.length++;
},remove: function(id) {
if (this.hash[id]) {
delete this.hash[id];
this.length--;
}
},getViews: function() {
var arr = [];
for (var i in this.hash) {
arr.push(this.hash[i]);
}
return arr;
},getParentView: function(view) {
for (var v = view.getParent(); v; v = v.getParent()) {
if (_331.contains(v.domNode, "mblView")) {
return v;
}
}
return null;
},getChildViews: function(_334) {
return _330.filter(this.getViews(), function(v) {
return this.getParentView(v) === _334;
}, this);
},getEnclosingView: function(node) {
for (var n = node; n && n.tagName !== "BODY"; n = n.parentNode) {
if (n.nodeType === 1 && _331.contains(n, "mblView")) {
return _332.byNode(n);
}
}
return null;
},getEnclosingScrollable: function(node) {
for (var w = _332.getEnclosingWidget(node); w; w = w.getParent()) {
if (w.scrollableParams && w._v) {
return w;
}
}
return null;
}};
return _333;
});
},"dojox/mobile/Heading": function() {
define("dojox/mobile/Heading", ["dojo/_base/array", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dijit/registry", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase", "./ProgressIndicator", "./ToolBarButton", "./View"], function(_335, _336, _337, lang, win, dom, _338, _339, _33a, _33b, _33c, _33d, _33e, _33f, _340, View) {
var dm = lang.getObject("dojox.mobile", true);
return _337("dojox.mobile.Heading", [_33e, _33d, _33c], {back: "",href: "",moveTo: "",transition: "slide",label: "",iconBase: "",tag: "h1",busy: false,progStyle: "mblProgWhite",baseClass: "mblHeading",buildRendering: function() {
this.domNode = this.containerNode = this.srcNodeRef || win.doc.createElement(this.tag);
this.inherited(arguments);
if (!this.label) {
_335.forEach(this.domNode.childNodes, function(n) {
if (n.nodeType == 3) {
var v = lang.trim(n.nodeValue);
if (v) {
this.label = v;
this.labelNode = _339.create("span", {innerHTML: v}, n, "replace");
}
}
}, this);
}
if (!this.labelNode) {
this.labelNode = _339.create("span", null, this.domNode);
}
this.labelNode.className = "mblHeadingSpanTitle";
this.labelDivNode = _339.create("div", {className: "mblHeadingDivTitle",innerHTML: this.labelNode.innerHTML}, this.domNode);
dom.setSelectable(this.domNode, false);
},startup: function() {
if (this._started) {
return;
}
var _341 = this.getParent && this.getParent();
if (!_341 || !_341.resize) {
var _342 = this;
setTimeout(function() {
_342.resize();
}, 0);
}
this.inherited(arguments);
},resize: function() {
if (this.labelNode) {
var _343, _344;
var _345 = this.containerNode.childNodes;
for (var i = _345.length - 1; i >= 0; i--) {
var c = _345[i];
if (c.nodeType === 1 && _33a.get(c, "display") !== "none") {
if (!_344 && _33a.get(c, "float") === "right") {
_344 = c;
}
if (!_343 && _33a.get(c, "float") === "left") {
_343 = c;
}
}
}
if (!this.labelNodeLen && this.label) {
this.labelNode.style.display = "inline";
this.labelNodeLen = this.labelNode.offsetWidth;
this.labelNode.style.display = "";
}
var bw = this.domNode.offsetWidth;
var rw = _344 ? bw - _344.offsetLeft + 5 : 0;
var lw = _343 ? _343.offsetLeft + _343.offsetWidth + 5 : 0;
var tw = this.labelNodeLen || 0;
_338[bw - Math.max(rw, lw) * 2 > tw ? "add" : "remove"](this.domNode, "mblHeadingCenterTitle");
}
_335.forEach(this.getChildren(), function(_346) {
if (_346.resize) {
_346.resize();
}
});
},_setBackAttr: function(back) {
this._set("back", back);
if (!this.backButton) {
this.backButton = new _340({arrow: "left",label: back,moveTo: this.moveTo,back: !this.moveTo,href: this.href,transition: this.transition,transitionDir: -1});
this.backButton.placeAt(this.domNode, "first");
} else {
this.backButton.set("label", back);
}
this.resize();
},_setMoveToAttr: function(_347) {
this._set("moveTo", _347);
if (this.backButton) {
this.backButton.set("moveTo", _347);
}
},_setLabelAttr: function(_348) {
this._set("label", _348);
this.labelNode.innerHTML = this.labelDivNode.innerHTML = this._cv ? this._cv(_348) : _348;
},_setBusyAttr: function(busy) {
var prog = this._prog;
if (busy) {
if (!prog) {
prog = this._prog = new _33f({size: 30,center: false});
_338.add(prog.domNode, this.progStyle);
}
_339.place(prog.domNode, this.domNode, "first");
prog.start();
} else {
prog.stop();
}
this._set("busy", busy);
}});
});
},"dojox/mobile/ToolBarButton": function() {
define("dojox/mobile/ToolBarButton", ["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "./sniff", "./_ItemBase"], function(_349, lang, win, _34a, _34b, _34c, has, _34d) {
return _349("dojox.mobile.ToolBarButton", _34d, {selected: false,arrow: "",light: true,defaultColor: "mblColorDefault",selColor: "mblColorDefaultSel",baseClass: "mblToolBarButton",_selStartMethod: "touch",_selEndMethod: "touch",buildRendering: function() {
if (!this.label && this.srcNodeRef) {
this.label = this.srcNodeRef.innerHTML;
}
this.label = lang.trim(this.label);
this.domNode = (this.srcNodeRef && this.srcNodeRef.tagName === "SPAN") ? this.srcNodeRef : _34b.create("span");
this.inherited(arguments);
if (this.light && !this.arrow && (!this.icon || !this.label)) {
this.labelNode = this.tableNode = this.bodyNode = this.iconParentNode = this.domNode;
_34a.add(this.domNode, this.defaultColor + " mblToolBarButtonBody" + (this.icon ? " mblToolBarButtonLightIcon" : " mblToolBarButtonLightText"));
return;
}
this.domNode.innerHTML = "";
if (this.arrow === "left" || this.arrow === "right") {
this.arrowNode = _34b.create("span", {className: "mblToolBarButtonArrow mblToolBarButton" + (this.arrow === "left" ? "Left" : "Right") + "Arrow " + (has("ie") ? "" : (this.defaultColor + " " + this.defaultColor + "45"))}, this.domNode);
_34a.add(this.domNode, "mblToolBarButtonHas" + (this.arrow === "left" ? "Left" : "Right") + "Arrow");
}
this.bodyNode = _34b.create("span", {className: "mblToolBarButtonBody"}, this.domNode);
this.tableNode = _34b.create("table", {cellPadding: "0",cellSpacing: "0",border: "0"}, this.bodyNode);
var row = this.tableNode.insertRow(-1);
this.iconParentNode = row.insertCell(-1);
this.labelNode = row.insertCell(-1);
this.iconParentNode.className = "mblToolBarButtonIcon";
this.labelNode.className = "mblToolBarButtonLabel";
if (this.icon && this.icon !== "none" && this.label) {
_34a.add(this.domNode, "mblToolBarButtonHasIcon");
_34a.add(this.bodyNode, "mblToolBarButtonLabeledIcon");
}
_34a.add(this.bodyNode, this.defaultColor);
},startup: function() {
if (this._started) {
return;
}
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onClick");
this.inherited(arguments);
if (!this._isOnLine) {
this._isOnLine = true;
this.set("icon", this._pendingIcon !== undefined ? this._pendingIcon : this.icon);
delete this._pendingIcon;
}
},_onClick: function(e) {
if (e && e.type === "keydown" && e.keyCode !== 13) {
return;
}
if (this.onClick(e) === false) {
return;
}
this.defaultClickAction(e);
},onClick: function() {
},_setLabelAttr: function(text) {
this.inherited(arguments);
_34a.toggle(this.tableNode, "mblToolBarButtonText", text);
},_setSelectedAttr: function(_34e) {
var _34f = function(node, a, b) {
_34a.replace(node, a + " " + a + "45", b + " " + b + "45");
};
this.inherited(arguments);
if (_34e) {
_34a.replace(this.bodyNode, this.selColor, this.defaultColor);
if (!has("ie") && this.arrowNode) {
_34f(this.arrowNode, this.selColor, this.defaultColor);
}
} else {
_34a.replace(this.bodyNode, this.defaultColor, this.selColor);
if (!has("ie") && this.arrowNode) {
_34f(this.arrowNode, this.defaultColor, this.selColor);
}
}
_34a.toggle(this.domNode, "mblToolBarButtonSelected", _34e);
_34a.toggle(this.bodyNode, "mblToolBarButtonBodySelected", _34e);
}});
});
},"dojox/mobile/_ItemBase": function() {
define("dojox/mobile/_ItemBase", ["dojo/_base/array", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-class", "dojo/touch", "dijit/registry", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase", "./TransitionEvent", "./iconUtils", "./sniff"], function(_350, _351, lang, win, _352, _353, _354, _355, _356, _357, _358, _359, has) {
return _351("dojox.mobile._ItemBase", [_357, _356, _355], {icon: "",iconPos: "",alt: "",href: "",hrefTarget: "",moveTo: "",scene: "",clickable: false,url: "",urlTarget: "",back: false,transition: "",transitionDir: 1,transitionOptions: null,callback: null,label: "",toggle: false,selected: false,tabIndex: "0",_setTabIndexAttr: "",paramsToInherit: "transition,icon",_selStartMethod: "none",_selEndMethod: "none",_delayedSelection: false,_duration: 800,_handleClick: true,buildRendering: function() {
this.inherited(arguments);
this._isOnLine = this.inheritParams();
},startup: function() {
if (this._started) {
return;
}
if (!this._isOnLine) {
this.inheritParams();
}
if (this._handleClick && this._selStartMethod === "touch") {
this._onTouchStartHandle = this.connect(this.domNode, _353.press, "_onTouchStart");
}
this.inherited(arguments);
},inheritParams: function() {
var _35a = this.getParent();
if (_35a) {
_350.forEach(this.paramsToInherit.split(/,/), function(p) {
if (p.match(/icon/i)) {
var base = p + "Base", pos = p + "Pos";
if (this[p] && _35a[base] && _35a[base].charAt(_35a[base].length - 1) === "/") {
this[p] = _35a[base] + this[p];
}
if (!this[p]) {
this[p] = _35a[base];
}
if (!this[pos]) {
this[pos] = _35a[pos];
}
}
if (!this[p]) {
this[p] = _35a[p];
}
}, this);
}
return !!_35a;
},getTransOpts: function() {
var opts = this.transitionOptions || {};
_350.forEach(["moveTo", "href", "hrefTarget", "url", "target", "urlTarget", "scene", "transition", "transitionDir"], function(p) {
opts[p] = opts[p] || this[p];
}, this);
return opts;
},userClickAction: function() {
},defaultClickAction: function(e) {
this.handleSelection(e);
if (this.userClickAction(e) === false) {
return;
}
this.makeTransition(e);
},handleSelection: function(e) {
if (this._delayedSelection) {
this.set("selected", true);
}
if (this._onTouchEndHandle) {
this.disconnect(this._onTouchEndHandle);
this._onTouchEndHandle = null;
}
var p = this.getParent();
if (this.toggle) {
this.set("selected", !this._currentSel);
} else {
if (p && p.selectOne) {
this.set("selected", true);
} else {
if (this._selEndMethod === "touch") {
this.set("selected", false);
} else {
if (this._selEndMethod === "timer") {
var _35b = this;
this.defer(function() {
_35b.set("selected", false);
}, this._duration);
}
}
}
}
},makeTransition: function(e) {
if (this.back && history) {
history.back();
return;
}
if (this.href && this.hrefTarget) {
win.global.open(this.href, this.hrefTarget || "_blank");
this._onNewWindowOpened(e);
return;
}
var opts = this.getTransOpts();
var _35c = !!(opts.moveTo || opts.href || opts.url || opts.target || opts.scene);
if (this._prepareForTransition(e, _35c ? opts : null) === false) {
return;
}
if (_35c) {
this.setTransitionPos(e);
new _358(this.domNode, opts, e).dispatch();
}
},_onNewWindowOpened: function() {
},_prepareForTransition: function(e, _35d) {
},_onTouchStart: function(e) {
if (this.getParent().isEditing || this.onTouchStart(e) === false) {
return;
}
if (!this._onTouchEndHandle && this._selStartMethod === "touch") {
this._onTouchMoveHandle = this.connect(win.body(), _353.move, "_onTouchMove");
this._onTouchEndHandle = this.connect(win.body(), _353.release, "_onTouchEnd");
}
this.touchStartX = e.touches ? e.touches[0].pageX : e.clientX;
this.touchStartY = e.touches ? e.touches[0].pageY : e.clientY;
this._currentSel = this.selected;
if (this._delayedSelection) {
this._selTimer = setTimeout(lang.hitch(this, function() {
this.set("selected", true);
}), 100);
} else {
this.set("selected", true);
}
},onTouchStart: function() {
},_onTouchMove: function(e) {
var x = e.touches ? e.touches[0].pageX : e.clientX;
var y = e.touches ? e.touches[0].pageY : e.clientY;
if (Math.abs(x - this.touchStartX) >= 4 || Math.abs(y - this.touchStartY) >= 4) {
this.cancel();
var p = this.getParent();
if (p && p.selectOne) {
this._prevSel && this._prevSel.set("selected", true);
} else {
this.set("selected", false);
}
}
},_disconnect: function() {
this.disconnect(this._onTouchMoveHandle);
this.disconnect(this._onTouchEndHandle);
this._onTouchMoveHandle = this._onTouchEndHandle = null;
},cancel: function() {
if (this._selTimer) {
clearTimeout(this._selTimer);
this._selTimer = null;
}
this._disconnect();
},_onTouchEnd: function(e) {
if (!this._selTimer && this._delayedSelection) {
return;
}
this.cancel();
this._onClick(e);
},setTransitionPos: function(e) {
var w = this;
while (true) {
w = w.getParent();
if (!w || _352.contains(w.domNode, "mblView")) {
break;
}
}
if (w) {
w.clickedPosX = e.clientX;
w.clickedPosY = e.clientY;
}
},transitionTo: function(_35e, href, url, _35f) {
var opts = (_35e && typeof (_35e) === "object") ? _35e : {moveTo: _35e,href: href,url: url,scene: _35f,transition: this.transition,transitionDir: this.transitionDir};
new _358(this.domNode, opts).dispatch();
},_setIconAttr: function(icon) {
if (!this._isOnLine) {
this._pendingIcon = icon;
return;
}
this._set("icon", icon);
this.iconNode = _359.setIcon(icon, this.iconPos, this.iconNode, this.alt, this.iconParentNode, this.refNode, this.position);
},_setLabelAttr: function(text) {
this._set("label", text);
this.labelNode.innerHTML = this._cv ? this._cv(text) : text;
},_setSelectedAttr: function(_360) {
if (_360) {
var p = this.getParent();
if (p && p.selectOne) {
var arr = _350.filter(p.getChildren(), function(w) {
return w.selected;
});
_350.forEach(arr, function(c) {
this._prevSel = c;
c.set("selected", false);
}, this);
}
}
this._set("selected", _360);
}});
});
},"dojox/mobile/iconUtils": function() {
define("dojox/mobile/iconUtils", ["dojo/_base/array", "dojo/_base/config", "dojo/_base/connect", "dojo/_base/event", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "./sniff"], function(_361, _362, _363, _364, lang, win, _365, _366, _367, has) {
var dm = lang.getObject("dojox.mobile", true);
var _368 = function() {
this.setupSpriteIcon = function(_369, _36a) {
if (_369 && _36a) {
var arr = _361.map(_36a.split(/[ ,]/), function(item) {
return item - 0;
});
var t = arr[0];
var r = arr[1] + arr[2];
var b = arr[0] + arr[3];
var l = arr[1];
_367.set(_369, {clip: "rect(" + t + "px " + r + "px " + b + "px " + l + "px)",top: (_369.parentNode ? _367.get(_369, "top") : 0) - t + "px",left: -l + "px"});
_365.add(_369, "mblSpriteIcon");
}
};
this.createDomButton = function(_36b, _36c, _36d) {
if (!this._domButtons) {
if (has("webkit")) {
var _36e = function(_36f, dic) {
var i, j;
if (!_36f) {
var _370 = {};
var ss = win.doc.styleSheets;
for (i = 0; i < ss.length; i++) {
ss[i] && _36e(ss[i], _370);
}
return _370;
}
var _371 = _36f.cssRules || [];
for (i = 0; i < _371.length; i++) {
var rule = _371[i];
if (rule.href && rule.styleSheet) {
_36e(rule.styleSheet, dic);
} else {
if (rule.selectorText) {
var sels = rule.selectorText.split(/,/);
for (j = 0; j < sels.length; j++) {
var sel = sels[j];
var n = sel.split(/>/).length - 1;
if (sel.match(/(mblDomButton\w+)/)) {
var cls = RegExp.$1;
if (!dic[cls] || n > dic[cls]) {
dic[cls] = n;
}
}
}
}
}
}
return dic;
};
this._domButtons = _36e();
} else {
this._domButtons = {};
}
}
var s = _36b.className;
var node = _36d || _36b;
if (s.match(/(mblDomButton\w+)/) && s.indexOf("/") === -1) {
var _372 = RegExp.$1;
var nDiv = 4;
if (s.match(/(mblDomButton\w+_(\d+))/)) {
nDiv = RegExp.$2 - 0;
} else {
if (this._domButtons[_372] !== undefined) {
nDiv = this._domButtons[_372];
}
}
var _373 = null;
if (has("bb") && _362["mblBBBoxShadowWorkaround"] !== false) {
_373 = {style: "-webkit-box-shadow:none"};
}
for (var i = 0, p = node; i < nDiv; i++) {
p = p.firstChild || _366.create("div", _373, p);
}
if (_36d) {
setTimeout(function() {
_365.remove(_36b, _372);
}, 0);
_365.add(_36d, _372);
}
} else {
if (s.indexOf(".") !== -1) {
_366.create("img", {src: s}, node);
} else {
return null;
}
}
_365.add(node, "mblDomButton");
!!_36c && _367.set(node, _36c);
return node;
};
this.createIcon = function(icon, _374, node, _375, _376, _377, pos) {
_375 = _375 || "";
if (icon && icon.indexOf("mblDomButton") === 0) {
if (!node) {
node = _366.create("div", null, _377 || _376, pos);
} else {
if (node.className.match(/(mblDomButton\w+)/)) {
_365.remove(node, RegExp.$1);
}
}
node.title = _375;
_365.add(node, icon);
this.createDomButton(node);
} else {
if (icon && icon !== "none") {
if (!node || node.nodeName !== "IMG") {
node = _366.create("img", {alt: _375}, _377 || _376, pos);
}
node.src = (icon || "").replace("${theme}", dm.currentTheme);
this.setupSpriteIcon(node, _374);
if (_374 && _376) {
var arr = _374.split(/[ ,]/);
_367.set(_376, {width: arr[2] + "px",height: arr[3] + "px"});
_365.add(_376, "mblSpriteIconParent");
}
_363.connect(node, "ondragstart", _364, "stop");
}
}
return node;
};
this.iconWrapper = false;
this.setIcon = function(icon, _378, _379, alt, _37a, _37b, pos) {
if (!_37a || !icon && !_379) {
return null;
}
if (icon && icon !== "none") {
if (!this.iconWrapper && icon.indexOf("mblDomButton") !== 0 && !_378) {
if (_379 && _379.tagName === "DIV") {
_366.destroy(_379);
_379 = null;
}
_379 = this.createIcon(icon, null, _379, alt, _37a, _37b, pos);
_365.add(_379, "mblImageIcon");
} else {
if (_379 && _379.tagName === "IMG") {
_366.destroy(_379);
_379 = null;
}
_379 && _366.empty(_379);
if (!_379) {
_379 = _366.create("div", null, _37b || _37a, pos);
}
this.createIcon(icon, _378, null, null, _379);
if (alt) {
_379.title = alt;
}
}
_365.remove(_37a, "mblNoIcon");
return _379;
} else {
_366.destroy(_379);
_365.add(_37a, "mblNoIcon");
return null;
}
};
};
return new _368();
});
},"dojox/mobile/RoundRect": function() {
define("dojox/mobile/RoundRect", ["dojo/_base/declare", "dojo/dom-class", "./Container"], function(_37c, _37d, _37e) {
return _37c("dojox.mobile.RoundRect", _37e, {shadow: false,baseClass: "mblRoundRect",buildRendering: function() {
this.inherited(arguments);
if (this.shadow) {
_37d.add(this.domNode, "mblShadow");
}
}});
});
},"dojox/mobile/Container": function() {
define("dojox/mobile/Container", ["dojo/_base/declare", "dijit/_Container", "./Pane"], function(_37f, _380, Pane) {
return _37f("dojox.mobile.Container", [Pane, _380], {baseClass: "mblContainer"});
});
},"dojox/mobile/Pane": function() {
define("dojox/mobile/Pane", ["dojo/_base/array", "dojo/_base/declare", "dijit/_Contained", "dijit/_WidgetBase"], function(_381, _382, _383, _384) {
return _382("dojox.mobile.Pane", [_384, _383], {baseClass: "mblPane",buildRendering: function() {
this.inherited(arguments);
if (!this.containerNode) {
this.containerNode = this.domNode;
}
},resize: function() {
_381.forEach(this.getChildren(), function(_385) {
if (_385.resize) {
_385.resize();
}
});
}});
});
},"dojox/mobile/RoundRectCategory": function() {
define("dojox/mobile/RoundRectCategory", ["dojo/_base/declare", "dojo/_base/window", "dojo/dom-construct", "dijit/_Contained", "dijit/_WidgetBase"], function(_386, win, _387, _388, _389) {
return _386("dojox.mobile.RoundRectCategory", [_389, _388], {label: "",tag: "h2",baseClass: "mblRoundRectCategory",buildRendering: function() {
var _38a = this.domNode = this.containerNode = this.srcNodeRef || _387.create(this.tag);
this.inherited(arguments);
if (!this.label && _38a.childNodes.length === 1 && _38a.firstChild.nodeType === 3) {
this.label = _38a.firstChild.nodeValue;
}
},_setLabelAttr: function(_38b) {
this.label = _38b;
this.domNode.innerHTML = this._cv ? this._cv(_38b) : _38b;
}});
});
},"dojox/mobile/EdgeToEdgeCategory": function() {
define("dojox/mobile/EdgeToEdgeCategory", ["dojo/_base/declare", "./RoundRectCategory"], function(_38c, _38d) {
return _38c("dojox.mobile.EdgeToEdgeCategory", _38d, {buildRendering: function() {
this.inherited(arguments);
this.domNode.className = "mblEdgeToEdgeCategory";
}});
});
},"dojox/mobile/RoundRectList": function() {
define("dojox/mobile/RoundRectList", ["dojo/_base/array", "dojo/_base/declare", "dojo/_base/event", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-construct", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase"], function(_38e, _38f, _390, lang, win, _391, _392, _393, _394) {
return _38f("dojox.mobile.RoundRectList", [_394, _393, _392], {transition: "slide",iconBase: "",iconPos: "",select: "",stateful: false,syncWithViews: false,editable: false,tag: "ul",editableMixinClass: "dojox/mobile/_EditableListMixin",baseClass: "mblRoundRectList",buildRendering: function() {
this.domNode = this.srcNodeRef || _391.create(this.tag);
this.inherited(arguments);
},postCreate: function() {
if (this.editable) {
require([this.editableMixinClass], lang.hitch(this, function(_395) {
_38f.safeMixin(this, new _395());
}));
}
this.connect(this.domNode, "onselectstart", _390.stop);
if (this.syncWithViews) {
var f = function(view, _396, dir, _397, _398, _399) {
var _39a = _38e.filter(this.getChildren(), function(w) {
return w.moveTo === "#" + view.id || w.moveTo === view.id;
})[0];
if (_39a) {
_39a.set("selected", true);
}
};
this.subscribe("/dojox/mobile/afterTransitionIn", f);
this.subscribe("/dojox/mobile/startView", f);
}
},resize: function() {
_38e.forEach(this.getChildren(), function(_39b) {
if (_39b.resize) {
_39b.resize();
}
});
},onCheckStateChanged: function() {
},_setStatefulAttr: function(_39c) {
this._set("stateful", _39c);
this.selectOne = _39c;
_38e.forEach(this.getChildren(), function(_39d) {
_39d.setArrow && _39d.setArrow();
});
},deselectItem: function(item) {
item.set("selected", false);
},deselectAll: function() {
_38e.forEach(this.getChildren(), function(_39e) {
_39e.set("selected", false);
});
},selectItem: function(item) {
item.set("selected", true);
}});
});
},"dojox/mobile/EdgeToEdgeList": function() {
define("dojox/mobile/EdgeToEdgeList", ["dojo/_base/declare", "./RoundRectList"], function(_39f, _3a0) {
return _39f("dojox.mobile.EdgeToEdgeList", _3a0, {buildRendering: function() {
this.inherited(arguments);
this.domNode.className = "mblEdgeToEdgeList";
}});
});
},"dojox/mobile/ListItem": function() {
define("dojox/mobile/ListItem", ["dojo/_base/array", "dojo/_base/declare", "dojo/_base/lang", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dijit/registry", "dijit/_WidgetBase", "./iconUtils", "./_ItemBase", "./ProgressIndicator"], function(_3a1, _3a2, lang, _3a3, _3a4, _3a5, _3a6, _3a7, _3a8, _3a9, _3aa) {
var _3ab = _3a2("dojox.mobile.ListItem", _3a9, {rightText: "",rightIcon: "",rightIcon2: "",deleteIcon: "",anchorLabel: false,noArrow: false,checked: false,arrowClass: "",checkClass: "",uncheckClass: "",variableHeight: false,rightIconTitle: "",rightIcon2Title: "",header: false,tag: "li",busy: false,progStyle: "",paramsToInherit: "variableHeight,transition,deleteIcon,icon,rightIcon,rightIcon2,uncheckIcon,arrowClass,checkClass,uncheckClass,deleteIconTitle,deleteIconRole",baseClass: "mblListItem",_selStartMethod: "touch",_selEndMethod: "timer",_delayedSelection: true,_selClass: "mblListItemSelected",buildRendering: function() {
this.domNode = this.containerNode = this.srcNodeRef || _3a4.create(this.tag);
this.inherited(arguments);
if (this.selected) {
_3a3.add(this.domNode, this._selClass);
}
if (this.header) {
_3a3.replace(this.domNode, "mblEdgeToEdgeCategory", this.baseClass);
}
this.labelNode = _3a4.create("div", {className: "mblListItemLabel"});
var ref = this.srcNodeRef;
if (ref && ref.childNodes.length === 1 && ref.firstChild.nodeType === 3) {
this.labelNode.appendChild(ref.firstChild);
}
this.domNode.appendChild(this.labelNode);
if (this.anchorLabel) {
this.labelNode.style.display = "inline";
this.labelNode.style.cursor = "pointer";
this._anchorClickHandle = this.connect(this.labelNode, "onclick", "_onClick");
this.onTouchStart = function(e) {
return (e.target !== this.labelNode);
};
}
this._layoutChildren = [];
},startup: function() {
if (this._started) {
return;
}
var _3ac = this.getParent();
var opts = this.getTransOpts();
if (opts.moveTo || opts.href || opts.url || this.clickable || (_3ac && _3ac.select)) {
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onClick");
} else {
this._handleClick = false;
}
this.inherited(arguments);
if (_3a3.contains(this.domNode, "mblVariableHeight")) {
this.variableHeight = true;
}
if (this.variableHeight) {
_3a3.add(this.domNode, "mblVariableHeight");
this.defer(lang.hitch(this, "layoutVariableHeight"), 0);
}
if (!this._isOnLine) {
this._isOnLine = true;
this.set({icon: this._pending_icon !== undefined ? this._pending_icon : this.icon,deleteIcon: this._pending_deleteIcon !== undefined ? this._pending_deleteIcon : this.deleteIcon,rightIcon: this._pending_rightIcon !== undefined ? this._pending_rightIcon : this.rightIcon,rightIcon2: this._pending_rightIcon2 !== undefined ? this._pending_rightIcon2 : this.rightIcon2,uncheckIcon: this._pending_uncheckIcon !== undefined ? this._pending_uncheckIcon : this.uncheckIcon});
delete this._pending_icon;
delete this._pending_deleteIcon;
delete this._pending_rightIcon;
delete this._pending_rightIcon2;
delete this._pending_uncheckIcon;
}
if (_3ac && _3ac.select) {
this.set("checked", this._pendingChecked !== undefined ? this._pendingChecked : this.checked);
delete this._pendingChecked;
}
this.setArrow();
this.layoutChildren();
},layoutChildren: function() {
var _3ad;
_3a1.forEach(this.domNode.childNodes, function(n) {
if (n.nodeType !== 1) {
return;
}
var _3ae = n.getAttribute("layout") || (_3a6.byNode(n) || {}).layout;
if (_3ae) {
_3a3.add(n, "mblListItemLayout" + _3ae.charAt(0).toUpperCase() + _3ae.substring(1));
this._layoutChildren.push(n);
if (_3ae === "center") {
_3ad = n;
}
}
}, this);
if (_3ad) {
this.domNode.insertBefore(_3ad, this.domNode.firstChild);
}
},resize: function() {
if (this.variableHeight) {
this.layoutVariableHeight();
}
this.labelNode.style.display = this.labelNode.firstChild ? "block" : "inline";
},_onTouchStart: function(e) {
if (e.target.getAttribute("preventTouch") || (_3a6.getEnclosingWidget(e.target) || {}).preventTouch) {
return;
}
this.inherited(arguments);
},_onClick: function(e) {
if (this.getParent().isEditing || e && e.type === "keydown" && e.keyCode !== 13) {
return;
}
if (this.onClick(e) === false) {
return;
}
var n = this.labelNode;
if (this.anchorLabel && e.currentTarget === n) {
_3a3.add(n, "mblListItemLabelSelected");
setTimeout(function() {
_3a3.remove(n, "mblListItemLabelSelected");
}, this._duration);
this.onAnchorLabelClicked(e);
return;
}
var _3af = this.getParent();
if (_3af.select) {
if (_3af.select === "single") {
if (!this.checked) {
this.set("checked", true);
}
} else {
if (_3af.select === "multiple") {
this.set("checked", !this.checked);
}
}
}
this.defaultClickAction(e);
},onClick: function() {
},onAnchorLabelClicked: function(e) {
},layoutVariableHeight: function() {
var h = this.domNode.offsetHeight;
if (h === this.domNodeHeight) {
return;
}
this.domNodeHeight = h;
_3a1.forEach(this._layoutChildren.concat([this.rightTextNode, this.rightIcon2Node, this.rightIconNode, this.uncheckIconNode, this.iconNode, this.deleteIconNode, this.knobIconNode]), function(n) {
if (n) {
var _3b0 = this.domNode;
var f = function() {
var t = Math.round((_3b0.offsetHeight - n.offsetHeight) / 2) - _3a5.get(_3b0, "paddingTop");
n.style.marginTop = t + "px";
};
if (n.offsetHeight === 0 && n.tagName === "IMG") {
n.onload = f;
} else {
f();
}
}
}, this);
},setArrow: function() {
if (this.checked) {
return;
}
var c = "";
var _3b1 = this.getParent();
var opts = this.getTransOpts();
if (opts.moveTo || opts.href || opts.url || this.clickable) {
if (!this.noArrow && !(_3b1 && _3b1.selectOne)) {
c = this.arrowClass || "mblDomButtonArrow";
}
}
if (c) {
this._setRightIconAttr(c);
}
},_findRef: function(type) {
var i, node, list = ["deleteIcon", "icon", "rightIcon", "uncheckIcon", "rightIcon2", "rightText"];
for (i = _3a1.indexOf(list, type) + 1; i < list.length; i++) {
node = this[list[i] + "Node"];
if (node) {
return node;
}
}
for (i = list.length - 1; i >= 0; i--) {
node = this[list[i] + "Node"];
if (node) {
return node.nextSibling;
}
}
return this.domNode.firstChild;
},_setIcon: function(icon, type) {
if (!this._isOnLine) {
this["_pending_" + type] = icon;
return;
}
this._set(type, icon);
this[type + "Node"] = _3a8.setIcon(icon, this[type + "Pos"], this[type + "Node"], this[type + "Title"] || this.alt, this.domNode, this._findRef(type), "before");
if (this[type + "Node"]) {
var cap = type.charAt(0).toUpperCase() + type.substring(1);
_3a3.add(this[type + "Node"], "mblListItem" + cap);
}
var role = this[type + "Role"];
if (role) {
this[type + "Node"].setAttribute("role", role);
}
},_setDeleteIconAttr: function(icon) {
this._setIcon(icon, "deleteIcon");
},_setIconAttr: function(icon) {
this._setIcon(icon, "icon");
},_setRightTextAttr: function(text) {
if (!this.rightTextNode) {
this.rightTextNode = _3a4.create("div", {className: "mblListItemRightText"}, this.labelNode, "before");
}
this.rightText = text;
this.rightTextNode.innerHTML = this._cv ? this._cv(text) : text;
},_setRightIconAttr: function(icon) {
this._setIcon(icon, "rightIcon");
},_setUncheckIconAttr: function(icon) {
this._setIcon(icon, "uncheckIcon");
},_setRightIcon2Attr: function(icon) {
this._setIcon(icon, "rightIcon2");
},_setCheckedAttr: function(_3b2) {
if (!this._isOnLine) {
this._pendingChecked = _3b2;
return;
}
var _3b3 = this.getParent();
if (_3b3 && _3b3.select === "single" && _3b2) {
_3a1.forEach(_3b3.getChildren(), function(_3b4) {
_3b4 !== this && _3b4.checked && _3b4.set("checked", false);
}, this);
}
this._setRightIconAttr(this.checkClass || "mblDomButtonCheck");
this._setUncheckIconAttr(this.uncheckClass);
_3a3.toggle(this.domNode, "mblListItemChecked", _3b2);
_3a3.toggle(this.domNode, "mblListItemUnchecked", !_3b2);
_3a3.toggle(this.domNode, "mblListItemHasUncheck", !!this.uncheckIconNode);
this.rightIconNode.style.position = (this.uncheckIconNode && !_3b2) ? "absolute" : "";
if (_3b3 && this.checked !== _3b2) {
_3b3.onCheckStateChanged(this, _3b2);
}
this._set("checked", _3b2);
},_setBusyAttr: function(busy) {
var prog = this._prog;
if (busy) {
if (!this._progNode) {
this._progNode = _3a4.create("div", {className: "mblListItemIcon"});
prog = this._prog = new _3aa({size: 25,center: false});
_3a3.add(prog.domNode, this.progStyle);
this._progNode.appendChild(prog.domNode);
}
if (this.iconNode) {
this.domNode.replaceChild(this._progNode, this.iconNode);
} else {
_3a4.place(this._progNode, this._findRef("icon"), "before");
}
prog.start();
} else {
if (this.iconNode) {
this.domNode.replaceChild(this.iconNode, this._progNode);
} else {
this.domNode.removeChild(this._progNode);
}
prog.stop();
}
this._set("busy", busy);
},_setSelectedAttr: function(_3b5) {
this.inherited(arguments);
_3a3.toggle(this.domNode, this._selClass, _3b5);
}});
_3ab.ChildWidgetProperties = {layout: "",preventTouch: false};
lang.extend(_3a7, _3ab.ChildWidgetProperties);
return _3ab;
});
},"dojox/mobile/Switch": function() {
define("dojox/mobile/Switch", ["dojo/_base/array", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/event", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dojo/touch", "dijit/_Contained", "dijit/_WidgetBase", "./sniff"], function(_3b6, _3b7, _3b8, _3b9, win, _3ba, _3bb, _3bc, _3bd, _3be, _3bf, has) {
return _3b8("dojox.mobile.Switch", [_3bf, _3be], {value: "on",name: "",leftLabel: "ON",rightLabel: "OFF",shape: "mblSwDefaultShape",tabIndex: "0",_setTabIndexAttr: "",baseClass: "mblSwitch",role: "",_createdMasks: [],buildRendering: function() {
this.domNode = (this.srcNodeRef && this.srcNodeRef.tagName === "SPAN") ? this.srcNodeRef : _3bb.create("span");
this.inherited(arguments);
var c = (this.srcNodeRef && this.srcNodeRef.className) || this.className || this["class"];
if ((c = c.match(/mblSw.*Shape\d*/))) {
this.shape = c;
}
_3ba.add(this.domNode, this.shape);
var _3c0 = this.name ? " name=\"" + this.name + "\"" : "";
this.domNode.innerHTML = "
<div class=\"mblSwitchInner\">" + "
<div class=\"mblSwitchBg mblSwitchBgLeft\">" + "
<div class=\"mblSwitchText mblSwitchTextLeft\"></div>" + "</div>" + "
<div class=\"mblSwitchBg mblSwitchBgRight\">" + "
<div class=\"mblSwitchText mblSwitchTextRight\"></div>" + "</div>" + "
<div class=\"mblSwitchKnob\"></div>" + "<input type=\"hidden\"" + _3c0 + "></div>" + "</div>";
var n = this.inner = this.domNode.firstChild;
this.left = n.childNodes[0];
this.right = n.childNodes[1];
this.knob = n.childNodes[2];
this.input = n.childNodes[3];
},postCreate: function() {
this._clickHandle = this.connect(this.domNode, "onclick", "_onClick");
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onClick");
this._startHandle = this.connect(this.domNode, _3bd.press, "onTouchStart");
this._initialValue = this.value;
},_changeState: function(_3c1, anim) {
var on = (_3c1 === "on");
this.left.style.display = "";
this.right.style.display = "";
this.inner.style.left = "";
if (anim) {
_3ba.add(this.domNode, "mblSwitchAnimation");
}
_3ba.remove(this.domNode, on ? "mblSwitchOff" : "mblSwitchOn");
_3ba.add(this.domNode, on ? "mblSwitchOn" : "mblSwitchOff");
var _3c2 = this;
setTimeout(function() {
_3c2.left.style.display = on ? "" : "none";
_3c2.right.style.display = !on ? "" : "none";
_3ba.remove(_3c2.domNode, "mblSwitchAnimation");
}, anim ? 300 : 0);
},_createMaskImage: function() {
if (this._hasMaskImage) {
return;
}
this._width = this.domNode.offsetWidth - this.knob.offsetWidth;
this._hasMaskImage = true;
if (!has("webkit")) {
return;
}
var rDef = _3bc.get(this.left, "borderTopLeftRadius");
if (rDef == "0px") {
return;
}
var _3c3 = rDef.split(" ");
var rx = parseFloat(_3c3[0]), ry = (_3c3.length == 1) ? rx : parseFloat(_3c3[1]);
var w = this.domNode.offsetWidth, h = this.domNode.offsetHeight;
var id = (this.shape + "Mask" + w + h + rx + ry).replace(/\./, "_");
if (!this._createdMasks[id]) {
this._createdMasks[id] = 1;
var ctx = win.doc.getCSSCanvasContext("2d", id, w, h);
ctx.fillStyle = "#000000";
ctx.beginPath();
if (rx == ry) {
ctx.moveTo(rx, 0);
ctx.arcTo(0, 0, 0, rx, rx);
ctx.lineTo(0, h - rx);
ctx.arcTo(0, h, rx, h, rx);
ctx.lineTo(w - rx, h);
ctx.arcTo(w, h, w, rx, rx);
ctx.lineTo(w, rx);
ctx.arcTo(w, 0, w - rx, 0, rx);
} else {
var pi = Math.PI;
ctx.scale(1, ry / rx);
ctx.moveTo(rx, 0);
ctx.arc(rx, rx, rx, 1.5 * pi, 0.5 * pi, true);
ctx.lineTo(w - rx, 2 * rx);
ctx.arc(w - rx, rx, rx, 0.5 * pi, 1.5 * pi, true);
}
ctx.closePath();
ctx.fill();
}
this.domNode.style.webkitMaskImage = "-webkit-canvas(" + id + ")";
},_onClick: function(e) {
if (e && e.type === "keydown" && e.keyCode !== 13) {
return;
}
if (this.onClick(e) === false) {
return;
}
if (this._moved) {
return;
}
this.value = this.input.value = (this.value == "on") ? "off" : "on";
this._changeState(this.value, true);
this.onStateChanged(this.value);
},onClick: function() {
},onTouchStart: function(e) {
this._moved = false;
this.innerStartX = this.inner.offsetLeft;
if (!this._conn) {
this._conn = [this.connect(this.inner, _3bd.move, "onTouchMove"), this.connect(this.inner, _3bd.release, "onTouchEnd")];
}
this.touchStartX = e.touches ? e.touches[0].pageX : e.clientX;
this.left.style.display = "";
this.right.style.display = "";
_3b9.stop(e);
this._createMaskImage();
},onTouchMove: function(e) {
e.preventDefault();
var dx;
if (e.targetTouches) {
if (e.targetTouches.length != 1) {
return;
}
dx = e.targetTouches[0].clientX - this.touchStartX;
} else {
dx = e.clientX - this.touchStartX;
}
var pos = this.innerStartX + dx;
var d = 10;
if (pos <= -(this._width - d)) {
pos = -this._width;
}
if (pos >= -d) {
pos = 0;
}
this.inner.style.left = pos + "px";
if (Math.abs(dx) > d) {
this._moved = true;
}
},onTouchEnd: function(e) {
_3b6.forEach(this._conn, _3b7.disconnect);
this._conn = null;
if (this.innerStartX == this.inner.offsetLeft) {
if (has("touch") && !(has("android") >= 4.1)) {
var ev = win.doc.createEvent("MouseEvents");
ev.initEvent("click", true, true);
this.inner.dispatchEvent(ev);
}
return;
}
var _3c4 = (this.inner.offsetLeft < -(this._width / 2)) ? "off" : "on";
this._changeState(_3c4, true);
if (_3c4 != this.value) {
this.value = this.input.value = _3c4;
this.onStateChanged(_3c4);
}
},onStateChanged: function(_3c5) {
},_setValueAttr: function(_3c6) {
this._changeState(_3c6, false);
if (this.value != _3c6) {
this.onStateChanged(_3c6);
}
this.value = this.input.value = _3c6;
},_setLeftLabelAttr: function(_3c7) {
this.leftLabel = _3c7;
this.left.firstChild.innerHTML = this._cv ? this._cv(_3c7) : _3c7;
},_setRightLabelAttr: function(_3c8) {
this.rightLabel = _3c8;
this.right.firstChild.innerHTML = this._cv ? this._cv(_3c8) : _3c8;
},reset: function() {
this.set("value", this._initialValue);
}});
});
},"dojox/mobile/_compat": function() {
define("dojox/mobile/_compat", ["dojo/_base/array", "dojo/_base/config", "dojo/_base/connect", "dojo/_base/fx", "dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-geometry", "dojo/dom-style", "dojo/fx", "dojo/fx/easing", "dojo/ready", "dojo/uacss", "dijit/registry", "dojox/fx", "dojox/fx/flip", "./EdgeToEdgeList", "./IconContainer", "./ProgressIndicator", "./RoundRect", "./RoundRectList", "./ScrollableView", "./Switch", "./View", "require"], function(_3c9, _3ca, _3cb, bfx, lang, has, win, _3cc, _3cd, _3ce, _3cf, fx, _3d0, _3d1, _3d2, _3d3, xfx, flip, _3d4, _3d5, _3d6, _3d7, _3d8, _3d9, _3da, View, _3db) {
var dm = lang.getObject("dojox.mobile", true);
if (!has("webkit")) {
lang.extend(View, {_doTransition: function(_3dc, _3dd, _3de, dir) {
var anim;
this.wakeUp(_3dd);
var s1, s2;
if (!_3de || _3de == "none") {
_3dd.style.display = "";
_3dc.style.display = "none";
_3dd.style.left = "0px";
this.invokeCallback();
} else {
if (_3de == "slide" || _3de == "cover" || _3de == "reveal") {
var w = _3dc.offsetWidth;
s1 = fx.slideTo({node: _3dc,duration: 400,left: -w * dir,top: _3cf.get(_3dc, "top")});
s2 = fx.slideTo({node: _3dd,duration: 400,left: 0,top: _3cf.get(_3dd, "top")});
_3dd.style.position = "absolute";
_3dd.style.left = w * dir + "px";
_3dd.style.display = "";
anim = fx.combine([s1, s2]);
_3cb.connect(anim, "onEnd", this, function() {
_3dc.style.display = "none";
_3dc.style.left = "0px";
_3dd.style.position = "relative";
var _3df = _3d3.byNode(_3dd);
if (_3df && !_3cc.contains(_3df.domNode, "out")) {
_3df.containerNode.style.paddingTop = "";
}
this.invokeCallback();
});
anim.play();
} else {
if (_3de == "slidev" || _3de == "coverv" || _3de == "reavealv") {
var h = _3dc.offsetHeight;
s1 = fx.slideTo({node: _3dc,duration: 400,left: 0,top: -h * dir});
s2 = fx.slideTo({node: _3dd,duration: 400,left: 0,top: 0});
_3dd.style.position = "absolute";
_3dd.style.top = h * dir + "px";
_3dd.style.left = "0px";
_3dd.style.display = "";
anim = fx.combine([s1, s2]);
_3cb.connect(anim, "onEnd", this, function() {
_3dc.style.display = "none";
_3dd.style.position = "relative";
this.invokeCallback();
});
anim.play();
} else {
if (_3de == "flip") {
anim = xfx.flip({node: _3dc,dir: "right",depth: 0.5,duration: 400});
_3dd.style.position = "absolute";
_3dd.style.left = "0px";
_3cb.connect(anim, "onEnd", this, function() {
_3dc.style.display = "none";
_3dd.style.position = "relative";
_3dd.style.display = "";
this.invokeCallback();
});
anim.play();
} else {
anim = fx.chain([bfx.fadeOut({node: _3dc,duration: 600}), bfx.fadeIn({node: _3dd,duration: 600})]);
_3dd.style.position = "absolute";
_3dd.style.left = "0px";
_3dd.style.display = "";
_3cf.set(_3dd, "opacity", 0);
_3cb.connect(anim, "onEnd", this, function() {
_3dc.style.display = "none";
_3dd.style.position = "relative";
_3cf.set(_3dc, "opacity", 1);
this.invokeCallback();
});
anim.play();
}
}
}
}
},wakeUp: function(node) {
if (has("ie") && !node._wokeup) {
node._wokeup = true;
var disp = node.style.display;
node.style.display = "";
var _3e0 = node.getElementsByTagName("*");
for (var i = 0, len = _3e0.length; i < len; i++) {
var val = _3e0[i].style.display;
_3e0[i].style.display = "none";
_3e0[i].style.display = "";
_3e0[i].style.display = val;
}
node.style.display = disp;
}
}});
lang.extend(_3da, {_changeState: function(_3e1, anim) {
var on = (_3e1 === "on");
var pos;
if (!on) {
pos = -this.inner.firstChild.firstChild.offsetWidth;
} else {
pos = 0;
}
this.left.style.display = "";
this.right.style.display = "";
var _3e2 = this;
var f = function() {
_3cc.remove(_3e2.domNode, on ? "mblSwitchOff" : "mblSwitchOn");
_3cc.add(_3e2.domNode, on ? "mblSwitchOn" : "mblSwitchOff");
_3e2.left.style.display = on ? "" : "none";
_3e2.right.style.display = !on ? "" : "none";
};
if (anim) {
var a = fx.slideTo({node: this.inner,duration: 300,left: pos,onEnd: f});
a.play();
} else {
if (on || pos) {
this.inner.style.left = pos + "px";
}
f();
}
}});
lang.extend(_3d6, {scale: function(size) {
if (has("ie")) {
var dim = {w: size,h: size};
_3ce.setMarginBox(this.domNode, dim);
_3ce.setMarginBox(this.containerNode, dim);
} else {
if (has("ff")) {
var _3e3 = size / 40;
_3cf.set(this.containerNode, {MozTransform: "scale(" + _3e3 + ")",MozTransformOrigin: "0 0"});
_3ce.setMarginBox(this.domNode, {w: size,h: size});
_3ce.setMarginBox(this.containerNode, {w: size / _3e3,h: size / _3e3});
}
}
}});
if (has("ie")) {
lang.extend(_3d7, {buildRendering: function() {
dm.createRoundRect(this);
this.domNode.className = "mblRoundRect";
}});
_3d8._addChild = _3d8.prototype.addChild;
_3d8._postCreate = _3d8.prototype.postCreate;
lang.extend(_3d8, {buildRendering: function() {
dm.createRoundRect(this, true);
this.domNode.className = "mblRoundRectList";
},postCreate: function() {
_3d8._postCreate.apply(this, arguments);
this.redrawBorders();
},addChild: function(_3e4, _3e5) {
_3d8._addChild.apply(this, arguments);
this.redrawBorders();
if (dm.applyPngFilter) {
dm.applyPngFilter(_3e4.domNode);
}
},redrawBorders: function() {
if (this instanceof _3d4) {
return;
}
var _3e6 = false;
for (var i = this.containerNode.childNodes.length - 1; i >= 0; i--) {
var c = this.containerNode.childNodes[i];
if (c.tagName == "LI") {
c.style.borderBottomStyle = _3e6 ? "solid" : "none";
_3e6 = true;
}
}
}});
lang.extend(_3d4, {buildRendering: function() {
this.domNode = this.containerNode = this.srcNodeRef || win.doc.createElement("ul");
this.domNode.className = "mblEdgeToEdgeList";
}});
_3d5._addChild = _3d5.prototype.addChild;
lang.extend(_3d5, {addChild: function(_3e7, _3e8) {
_3d5._addChild.apply(this, arguments);
if (dm.applyPngFilter) {
dm.applyPngFilter(_3e7.domNode);
}
}});
lang.mixin(dm, {createRoundRect: function(_3e9, _3ea) {
var i, len;
_3e9.domNode = win.doc.createElement("div");
_3e9.domNode.style.padding = "0px";
_3e9.domNode.style.backgroundColor = "transparent";
_3e9.domNode.style.border = "none";
_3e9.containerNode = win.doc.createElement(_3ea ? "ul" : "div");
_3e9.containerNode.className = "mblRoundRectContainer";
if (_3e9.srcNodeRef) {
_3e9.srcNodeRef.parentNode.replaceChild(_3e9.domNode, _3e9.srcNodeRef);
for (i = 0, len = _3e9.srcNodeRef.childNodes.length; i < len; i++) {
_3e9.containerNode.appendChild(_3e9.srcNodeRef.removeChild(_3e9.srcNodeRef.firstChild));
}
_3e9.srcNodeRef = null;
}
_3e9.domNode.appendChild(_3e9.containerNode);
for (i = 0; i <= 5; i++) {
var top = _3cd.create("div");
top.className = "mblRoundCorner mblRoundCorner" + i + "T";
_3e9.domNode.insertBefore(top, _3e9.containerNode);
var _3eb = _3cd.create("div");
_3eb.className = "mblRoundCorner mblRoundCorner" + i + "B";
_3e9.domNode.appendChild(_3eb);
}
}});
lang.extend(_3d9, {postCreate: function() {
var _3ec = _3cd.create("div", {className: "mblDummyForIE",innerHTML: "&nbsp;"}, this.containerNode, "first");
_3cf.set(_3ec, {position: "relative",marginBottom: "-2px",fontSize: "1px"});
}});
}
if (has("ie") <= 6) {
dm.applyPngFilter = function(root) {
root = root || win.body();
var _3ed = root.getElementsByTagName("IMG");
var _3ee = _3db.toUrl("dojo/resources/blank.gif");
for (var i = 0, len = _3ed.length; i < len; i++) {
var img = _3ed[i];
var w = img.offsetWidth;
var h = img.offsetHeight;
if (w === 0 || h === 0) {
if (_3cf.get(img, "display") != "none") {
continue;
}
img.style.display = "";
w = img.offsetWidth;
h = img.offsetHeight;
img.style.display = "none";
if (w === 0 || h === 0) {
continue;
}
}
var src = img.src;
if (src.indexOf("resources/blank.gif") != -1) {
continue;
}
img.src = _3ee;
img.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')";
img.style.width = w + "px";
img.style.height = h + "px";
}
};
if (!dm._disableBgFilter && dm.createDomButton) {
dm._createDomButton_orig = dm.createDomButton;
dm.createDomButton = function(_3ef, _3f0, _3f1) {
var node = dm._createDomButton_orig.apply(this, arguments);
if (node && node.className && node.className.indexOf("mblDomButton") !== -1) {
var f = function() {
if (node.currentStyle && node.currentStyle.backgroundImage.match(/url.*(mblDomButton.*\.png)/)) {
var img = RegExp.$1;
var src = _3db.toUrl("dojox/mobile/themes/common/domButtons/compat/") + img;
node.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='crop')";
node.style.background = "none";
}
};
setTimeout(f, 1000);
setTimeout(f, 5000);
}
return node;
};
}
}
dm.loadCssFile = function(file) {
if (!dm.loadedCssFiles) {
dm.loadedCssFiles = [];
}
if (win.doc.createStyleSheet) {
setTimeout(function(file) {
return function() {
var ss = win.doc.createStyleSheet(file);
ss && dm.loadedCssFiles.push(ss.owningElement);
};
}(file), 0);
} else {
dm.loadedCssFiles.push(_3cd.create("link", {href: file,type: "text/css",rel: "stylesheet"}, win.doc.getElementsByTagName("head")[0]));
}
};
dm.loadCss = function(_3f2) {
if (!dm._loadedCss) {
var obj = {};
_3c9.forEach(dm.getCssPaths(), function(path) {
obj[path] = true;
});
dm._loadedCss = obj;
}
if (!lang.isArray(_3f2)) {
_3f2 = [_3f2];
}
for (var i = 0; i < _3f2.length; i++) {
var file = _3f2[i];
if (!dm._loadedCss[file]) {
dm._loadedCss[file] = true;
dm.loadCssFile(file);
}
}
};
dm.getCssPaths = function() {
var _3f3 = [];
var i, j, len;
var s = win.doc.styleSheets;
for (i = 0; i < s.length; i++) {
if (s[i].href) {
continue;
}
var r = s[i].cssRules || s[i].imports;
if (!r) {
continue;
}
for (j = 0; j < r.length; j++) {
if (r[j].href) {
_3f3.push(r[j].href);
}
}
}
var _3f4 = win.doc.getElementsByTagName("link");
for (i = 0, len = _3f4.length; i < len; i++) {
if (_3f4[i].href) {
_3f3.push(_3f4[i].href);
}
}
return _3f3;
};
dm.loadCompatPattern = /\/mobile\/themes\/.*\.css$/;
dm.loadCompatCssFiles = function(_3f5) {
if (has("ie") && !_3f5) {
setTimeout(function() {
dm.loadCompatCssFiles(true);
}, 0);
return;
}
dm._loadedCss = undefined;
var _3f6 = dm.getCssPaths();
for (var i = 0; i < _3f6.length; i++) {
var href = _3f6[i];
if ((href.match(_3ca.mblLoadCompatPattern || dm.loadCompatPattern) || location.href.indexOf("mobile/tests/") !== -1) && href.indexOf("-compat.css") === -1) {
var _3f7 = href.substring(0, href.length - 4) + "-compat.css";
dm.loadCss(_3f7);
}
}
};
dm.hideAddressBar = function(evt, _3f8) {
if (_3f8 !== false) {
dm.resizeAll();
}
};
_3d1(function() {
if (_3ca["mblLoadCompatCssFiles"] !== false) {
dm.loadCompatCssFiles();
}
if (dm.applyPngFilter) {
dm.applyPngFilter();
}
});
}
return dm;
});
},"dojo/fx": function() {
define(["./_base/lang", "./Evented", "./_base/kernel", "./_base/array", "./_base/connect", "./_base/fx", "./dom", "./dom-style", "./dom-geometry", "./ready", "require"], function(lang, _3f9, dojo, _3fa, _3fb, _3fc, dom, _3fd, geom, _3fe, _3ff) {
if (!dojo.isAsync) {
_3fe(0, function() {
var _400 = ["./fx/Toggler"];
_3ff(_400);
});
}
var _401 = dojo.fx = {};
var _402 = {_fire: function(evt, args) {
if (this[evt]) {
this[evt].apply(this, args || []);
}
return this;
}};
var _403 = function(_404) {
this._index = -1;
this._animations = _404 || [];
this._current = this._onAnimateCtx = this._onEndCtx = null;
this.duration = 0;
_3fa.forEach(this._animations, function(a) {
this.duration += a.duration;
if (a.delay) {
this.duration += a.delay;
}
}, this);
};
_403.prototype = new _3f9();
lang.extend(_403, {_onAnimate: function() {
this._fire("onAnimate", arguments);
},_onEnd: function() {
_3fb.disconnect(this._onAnimateCtx);
_3fb.disconnect(this._onEndCtx);
this._onAnimateCtx = this._onEndCtx = null;
if (this._index + 1 == this._animations.length) {
this._fire("onEnd");
} else {
this._current = this._animations[++this._index];
this._onAnimateCtx = _3fb.connect(this._current, "onAnimate", this, "_onAnimate");
this._onEndCtx = _3fb.connect(this._current, "onEnd", this, "_onEnd");
this._current.play(0, true);
}
},play: function(_405, _406) {
if (!this._current) {
this._current = this._animations[this._index = 0];
}
if (!_406 && this._current.status() == "playing") {
return this;
}
var _407 = _3fb.connect(this._current, "beforeBegin", this, function() {
this._fire("beforeBegin");
}), _408 = _3fb.connect(this._current, "onBegin", this, function(arg) {
this._fire("onBegin", arguments);
}), _409 = _3fb.connect(this._current, "onPlay", this, function(arg) {
this._fire("onPlay", arguments);
_3fb.disconnect(_407);
_3fb.disconnect(_408);
_3fb.disconnect(_409);
});
if (this._onAnimateCtx) {
_3fb.disconnect(this._onAnimateCtx);
}
this._onAnimateCtx = _3fb.connect(this._current, "onAnimate", this, "_onAnimate");
if (this._onEndCtx) {
_3fb.disconnect(this._onEndCtx);
}
this._onEndCtx = _3fb.connect(this._current, "onEnd", this, "_onEnd");
this._current.play.apply(this._current, arguments);
return this;
},pause: function() {
if (this._current) {
var e = _3fb.connect(this._current, "onPause", this, function(arg) {
this._fire("onPause", arguments);
_3fb.disconnect(e);
});
this._current.pause();
}
return this;
},gotoPercent: function(_40a, _40b) {
this.pause();
var _40c = this.duration * _40a;
this._current = null;
_3fa.some(this._animations, function(a) {
if (a.duration <= _40c) {
this._current = a;
return true;
}
_40c -= a.duration;
return false;
});
if (this._current) {
this._current.gotoPercent(_40c / this._current.duration, _40b);
}
return this;
},stop: function(_40d) {
if (this._current) {
if (_40d) {
for (; this._index + 1 < this._animations.length; ++this._index) {
this._animations[this._index].stop(true);
}
this._current = this._animations[this._index];
}
var e = _3fb.connect(this._current, "onStop", this, function(arg) {
this._fire("onStop", arguments);
_3fb.disconnect(e);
});
this._current.stop();
}
return this;
},status: function() {
return this._current ? this._current.status() : "stopped";
},destroy: function() {
if (this._onAnimateCtx) {
_3fb.disconnect(this._onAnimateCtx);
}
if (this._onEndCtx) {
_3fb.disconnect(this._onEndCtx);
}
}});
lang.extend(_403, _402);
_401.chain = function(_40e) {
return new _403(_40e);
};
var _40f = function(_410) {
this._animations = _410 || [];
this._connects = [];
this._finished = 0;
this.duration = 0;
_3fa.forEach(_410, function(a) {
var _411 = a.duration;
if (a.delay) {
_411 += a.delay;
}
if (this.duration < _411) {
this.duration = _411;
}
this._connects.push(_3fb.connect(a, "onEnd", this, "_onEnd"));
}, this);
this._pseudoAnimation = new _3fc.Animation({curve: [0, 1],duration: this.duration});
var self = this;
_3fa.forEach(["beforeBegin", "onBegin", "onPlay", "onAnimate", "onPause", "onStop", "onEnd"], function(evt) {
self._connects.push(_3fb.connect(self._pseudoAnimation, evt, function() {
self._fire(evt, arguments);
}));
});
};
lang.extend(_40f, {_doAction: function(_412, args) {
_3fa.forEach(this._animations, function(a) {
a[_412].apply(a, args);
});
return this;
},_onEnd: function() {
if (++this._finished > this._animations.length) {
this._fire("onEnd");
}
},_call: function(_413, args) {
var t = this._pseudoAnimation;
t[_413].apply(t, args);
},play: function(_414, _415) {
this._finished = 0;
this._doAction("play", arguments);
this._call("play", arguments);
return this;
},pause: function() {
this._doAction("pause", arguments);
this._call("pause", arguments);
return this;
},gotoPercent: function(_416, _417) {
var ms = this.duration * _416;
_3fa.forEach(this._animations, function(a) {
a.gotoPercent(a.duration < ms ? 1 : (ms / a.duration), _417);
});
this._call("gotoPercent", arguments);
return this;
},stop: function(_418) {
this._doAction("stop", arguments);
this._call("stop", arguments);
return this;
},status: function() {
return this._pseudoAnimation.status();
},destroy: function() {
_3fa.forEach(this._connects, _3fb.disconnect);
}});
lang.extend(_40f, _402);
_401.combine = function(_419) {
return new _40f(_419);
};
_401.wipeIn = function(args) {
var node = args.node = dom.byId(args.node), s = node.style, o;
var anim = _3fc.animateProperty(lang.mixin({properties: {height: {start: function() {
o = s.overflow;
s.overflow = "hidden";
if (s.visibility == "hidden" || s.display == "none") {
s.height = "1px";
s.display = "";
s.visibility = "";
return 1;
} else {
var _41a = _3fd.get(node, "height");
return Math.max(_41a, 1);
}
},end: function() {
return node.scrollHeight;
}}}}, args));
var fini = function() {
s.height = "auto";
s.overflow = o;
};
_3fb.connect(anim, "onStop", fini);
_3fb.connect(anim, "onEnd", fini);
return anim;
};
_401.wipeOut = function(args) {
var node = args.node = dom.byId(args.node), s = node.style, o;
var anim = _3fc.animateProperty(lang.mixin({properties: {height: {end: 1}}}, args));
_3fb.connect(anim, "beforeBegin", function() {
o = s.overflow;
s.overflow = "hidden";
s.display = "";
});
var fini = function() {
s.overflow = o;
s.height = "auto";
s.display = "none";
};
_3fb.connect(anim, "onStop", fini);
_3fb.connect(anim, "onEnd", fini);
return anim;
};
_401.slideTo = function(args) {
var node = args.node = dom.byId(args.node), top = null, left = null;
var init = (function(n) {
return function() {
var cs = _3fd.getComputedStyle(n);
var pos = cs.position;
top = (pos == "absolute" ? n.offsetTop : parseInt(cs.top) || 0);
left = (pos == "absolute" ? n.offsetLeft : parseInt(cs.left) || 0);
if (pos != "absolute" && pos != "relative") {
var ret = geom.position(n, true);
top = ret.y;
left = ret.x;
n.style.position = "absolute";
n.style.top = top + "px";
n.style.left = left + "px";
}
};
})(node);
init();
var anim = _3fc.animateProperty(lang.mixin({properties: {top: args.top || 0,left: args.left || 0}}, args));
_3fb.connect(anim, "beforeBegin", anim, init);
return anim;
};
return _401;
});
},"dojo/fx/easing": function() {
define(["../_base/lang"], function(lang) {
var _41b = {linear: function(n) {
return n;
},quadIn: function(n) {
return Math.pow(n, 2);
},quadOut: function(n) {
return n * (n - 2) * -1;
},quadInOut: function(n) {
n = n * 2;
if (n < 1) {
return Math.pow(n, 2) / 2;
}
return -1 * ((--n) * (n - 2) - 1) / 2;
},cubicIn: function(n) {
return Math.pow(n, 3);
},cubicOut: function(n) {
return Math.pow(n - 1, 3) + 1;
},cubicInOut: function(n) {
n = n * 2;
if (n < 1) {
return Math.pow(n, 3) / 2;
}
n -= 2;
return (Math.pow(n, 3) + 2) / 2;
},quartIn: function(n) {
return Math.pow(n, 4);
},quartOut: function(n) {
return -1 * (Math.pow(n - 1, 4) - 1);
},quartInOut: function(n) {
n = n * 2;
if (n < 1) {
return Math.pow(n, 4) / 2;
}
n -= 2;
return -1 / 2 * (Math.pow(n, 4) - 2);
},quintIn: function(n) {
return Math.pow(n, 5);
},quintOut: function(n) {
return Math.pow(n - 1, 5) + 1;
},quintInOut: function(n) {
n = n * 2;
if (n < 1) {
return Math.pow(n, 5) / 2;
}
n -= 2;
return (Math.pow(n, 5) + 2) / 2;
},sineIn: function(n) {
return -1 * Math.cos(n * (Math.PI / 2)) + 1;
},sineOut: function(n) {
return Math.sin(n * (Math.PI / 2));
},sineInOut: function(n) {
return -1 * (Math.cos(Math.PI * n) - 1) / 2;
},expoIn: function(n) {
return (n == 0) ? 0 : Math.pow(2, 10 * (n - 1));
},expoOut: function(n) {
return (n == 1) ? 1 : (-1 * Math.pow(2, -10 * n) + 1);
},expoInOut: function(n) {
if (n == 0) {
return 0;
}
if (n == 1) {
return 1;
}
n = n * 2;
if (n < 1) {
return Math.pow(2, 10 * (n - 1)) / 2;
}
--n;
return (-1 * Math.pow(2, -10 * n) + 2) / 2;
},circIn: function(n) {
return -1 * (Math.sqrt(1 - Math.pow(n, 2)) - 1);
},circOut: function(n) {
n = n - 1;
return Math.sqrt(1 - Math.pow(n, 2));
},circInOut: function(n) {
n = n * 2;
if (n < 1) {
return -1 / 2 * (Math.sqrt(1 - Math.pow(n, 2)) - 1);
}
n -= 2;
return 1 / 2 * (Math.sqrt(1 - Math.pow(n, 2)) + 1);
},backIn: function(n) {
var s = 1.70158;
return Math.pow(n, 2) * ((s + 1) * n - s);
},backOut: function(n) {
n = n - 1;
var s = 1.70158;
return Math.pow(n, 2) * ((s + 1) * n + s) + 1;
},backInOut: function(n) {
var s = 1.70158 * 1.525;
n = n * 2;
if (n < 1) {
return (Math.pow(n, 2) * ((s + 1) * n - s)) / 2;
}
n -= 2;
return (Math.pow(n, 2) * ((s + 1) * n + s) + 2) / 2;
},elasticIn: function(n) {
if (n == 0 || n == 1) {
return n;
}
var p = 0.3;
var s = p / 4;
n = n - 1;
return -1 * Math.pow(2, 10 * n) * Math.sin((n - s) * (2 * Math.PI) / p);
},elasticOut: function(n) {
if (n == 0 || n == 1) {
return n;
}
var p = 0.3;
var s = p / 4;
return Math.pow(2, -10 * n) * Math.sin((n - s) * (2 * Math.PI) / p) + 1;
},elasticInOut: function(n) {
if (n == 0) {
return 0;
}
n = n * 2;
if (n == 2) {
return 1;
}
var p = 0.3 * 1.5;
var s = p / 4;
if (n < 1) {
n -= 1;
return -0.5 * (Math.pow(2, 10 * n) * Math.sin((n - s) * (2 * Math.PI) / p));
}
n -= 1;
return 0.5 * (Math.pow(2, -10 * n) * Math.sin((n - s) * (2 * Math.PI) / p)) + 1;
},bounceIn: function(n) {
return (1 - _41b.bounceOut(1 - n));
},bounceOut: function(n) {
var s = 7.5625;
var p = 2.75;
var l;
if (n < (1 / p)) {
l = s * Math.pow(n, 2);
} else {
if (n < (2 / p)) {
n -= (1.5 / p);
l = s * Math.pow(n, 2) + 0.75;
} else {
if (n < (2.5 / p)) {
n -= (2.25 / p);
l = s * Math.pow(n, 2) + 0.9375;
} else {
n -= (2.625 / p);
l = s * Math.pow(n, 2) + 0.984375;
}
}
}
return l;
},bounceInOut: function(n) {
if (n < 0.5) {
return _41b.bounceIn(n * 2) / 2;
}
return (_41b.bounceOut(n * 2 - 1) / 2) + 0.5;
}};
lang.setObject("dojo.fx.easing", _41b);
return _41b;
});
},"dojo/uacss": function() {
define(["./dom-geometry", "./_base/lang", "./ready", "./sniff", "./_base/window"], function(_41c, lang, _41d, has, _41e) {
var html = _41e.doc.documentElement, ie = has("ie"), _41f = has("opera"), maj = Math.floor, ff = has("ff"), _420 = _41c.boxModel.replace(/-/, ""), _421 = {"dj_quirks": has("quirks"),"dj_opera": _41f,"dj_khtml": has("khtml"),"dj_webkit": has("webkit"),"dj_safari": has("safari"),"dj_chrome": has("chrome"),"dj_gecko": has("mozilla")};
if (ie) {
_421["dj_ie"] = true;
_421["dj_ie" + maj(ie)] = true;
_421["dj_iequirks"] = has("quirks");
}
if (ff) {
_421["dj_ff" + maj(ff)] = true;
}
_421["dj_" + _420] = true;
var _422 = "";
for (var clz in _421) {
if (_421[clz]) {
_422 += clz + " ";
}
}
html.className = lang.trim(html.className + " " + _422);
_41d(90, function() {
if (!_41c.isBodyLtr()) {
var _423 = "dj_rtl dijitRtl " + _422.replace(/ /g, "-rtl ");
html.className = lang.trim(html.className + " " + _423 + "dj_rtl dijitRtl " + _422.replace(/ /g, "-rtl "));
}
});
return has;
});
},"dojox/fx": function() {
define("dojox/fx", ["./fx/_base"], function(_424) {
return _424;
});
},"dojox/fx/_base": function() {
define("dojox/fx/_base", ["dojo/_base/array", "dojo/_base/lang", "dojo/_base/fx", "dojo/fx", "dojo/dom", "dojo/dom-style", "dojo/dom-geometry", "dojo/_base/connect", "dojo/_base/html"], function(_425, lang, _426, _427, dom, _428, _429, _42a, _42b) {
var _42c = lang.getObject("dojox.fx", true);
lang.mixin(_42c, {anim: _426.anim,animateProperty: _426.animateProperty,fadeTo: _426._fade,fadeIn: _426.fadeIn,fadeOut: _426.fadeOut,combine: _427.combine,chain: _427.chain,slideTo: _427.slideTo,wipeIn: _427.wipeIn,wipeOut: _427.wipeOut});
_42c.sizeTo = function(args) {
var node = args.node = dom.byId(args.node), abs = "absolute";
var _42d = args.method || "chain";
if (!args.duration) {
args.duration = 500;
}
if (_42d == "chain") {
args.duration = Math.floor(args.duration / 2);
}
var top, _42e, left, _42f, _430, _431 = null;
var init = (function(n) {
return function() {
var cs = _428.getComputedStyle(n), pos = cs.position, w = cs.width, h = cs.height;
top = (pos == abs ? n.offsetTop : parseInt(cs.top) || 0);
left = (pos == abs ? n.offsetLeft : parseInt(cs.left) || 0);
_430 = (w == "auto" ? 0 : parseInt(w));
_431 = (h == "auto" ? 0 : parseInt(h));
_42f = left - Math.floor((args.width - _430) / 2);
_42e = top - Math.floor((args.height - _431) / 2);
if (pos != abs && pos != "relative") {
var ret = _428.coords(n, true);
top = ret.y;
left = ret.x;
n.style.position = abs;
n.style.top = top + "px";
n.style.left = left + "px";
}
};
})(node);
var _432 = _426.animateProperty(lang.mixin({properties: {height: function() {
init();
return {end: args.height || 0,start: _431};
},top: function() {
return {start: top,end: _42e};
}}}, args));
var _433 = _426.animateProperty(lang.mixin({properties: {width: function() {
return {start: _430,end: args.width || 0};
},left: function() {
return {start: left,end: _42f};
}}}, args));
var anim = _427[(args.method == "combine" ? "combine" : "chain")]([_432, _433]);
return anim;
};
_42c.slideBy = function(args) {
var node = args.node = dom.byId(args.node), top, left;
var init = (function(n) {
return function() {
var cs = _428.getComputedStyle(n);
var pos = cs.position;
top = (pos == "absolute" ? n.offsetTop : parseInt(cs.top) || 0);
left = (pos == "absolute" ? n.offsetLeft : parseInt(cs.left) || 0);
if (pos != "absolute" && pos != "relative") {
var ret = _429.coords(n, true);
top = ret.y;
left = ret.x;
n.style.position = "absolute";
n.style.top = top + "px";
n.style.left = left + "px";
}
};
})(node);
init();
var _434 = _426.animateProperty(lang.mixin({properties: {top: top + (args.top || 0),left: left + (args.left || 0)}}, args));
_42a.connect(_434, "beforeBegin", _434, init);
return _434;
};
_42c.crossFade = function(args) {
var _435 = args.nodes[0] = dom.byId(args.nodes[0]), op1 = _42b.style(_435, "opacity"), _436 = args.nodes[1] = dom.byId(args.nodes[1]), op2 = _42b.style(_436, "opacity");
var _437 = _427.combine([_426[(op1 == 0 ? "fadeIn" : "fadeOut")](lang.mixin({node: _435}, args)), _426[(op1 == 0 ? "fadeOut" : "fadeIn")](lang.mixin({node: _436}, args))]);
return _437;
};
_42c.highlight = function(args) {
var node = args.node = dom.byId(args.node);
args.duration = args.duration || 400;
var _438 = args.color || "#ffff99", _439 = _42b.style(node, "backgroundColor");
if (_439 == "rgba(0, 0, 0, 0)") {
_439 = "transparent";
}
var anim = _426.animateProperty(lang.mixin({properties: {backgroundColor: {start: _438,end: _439}}}, args));
if (_439 == "transparent") {
_42a.connect(anim, "onEnd", anim, function() {
node.style.backgroundColor = _439;
});
}
return anim;
};
_42c.wipeTo = function(args) {
args.node = dom.byId(args.node);
var node = args.node, s = node.style;
var dir = (args.width ? "width" : "height"), _43a = args[dir], _43b = {};
_43b[dir] = {start: function() {
s.overflow = "hidden";
if (s.visibility == "hidden" || s.display == "none") {
s[dir] = "1px";
s.display = "";
s.visibility = "";
return 1;
} else {
var now = _42b.style(node, dir);
return Math.max(now, 1);
}
},end: _43a};
var anim = _426.animateProperty(lang.mixin({properties: _43b}, args));
return anim;
};
return _42c;
});
},"dojox/fx/flip": function() {
define("dojox/fx/flip", ["dojo/_base/kernel", "dojo/_base/html", "dojo/dom", "dojo/dom-construct", "dojo/dom-geometry", "dojo/_base/connect", "dojo/_base/Color", "dojo/_base/sniff", "dojo/_base/lang", "dojo/_base/window", "dojo/_base/fx", "dojo/fx", "./_base"], function(_43c, _43d, dom, _43e, _43f, _440, _441, has, lang, _442, _443, _444, _445) {
_43c.experimental("dojox.fx.flip");
var _446 = "border", _447 = "Width", _448 = "Height", _449 = "Top", _44a = "Right", _44b = "Left", _44c = "Bottom";
_445.flip = function(args) {
var _44d = _43e.create("div"), node = args.node = dom.byId(args.node), s = node.style, dims = null, hs = null, pn = null, _44e = args.lightColor || "#dddddd", _44f = args.darkColor || "#555555", _450 = _43d.style(node, "backgroundColor"), _451 = args.endColor || _450, _452 = {}, _453 = [], _454 = args.duration ? args.duration / 2 : 250, dir = args.dir || "left", _455 = 0.9, _456 = "transparent", _457 = args.whichAnim, axis = args.axis || "center", _458 = args.depth;
var _459 = function(_45a) {
return ((new _441(_45a)).toHex() === "#000000") ? "#000001" : _45a;
};
if (has("ie") < 7) {
_451 = _459(_451);
_44e = _459(_44e);
_44f = _459(_44f);
_450 = _459(_450);
_456 = "black";
_44d.style.filter = "chroma(color='#000000')";
}
var init = (function(n) {
return function() {
var ret = _43d.coords(n, true);
dims = {top: ret.y,left: ret.x,width: ret.w,height: ret.h};
};
})(node);
init();
hs = {position: "absolute",top: dims["top"] + "px",left: dims["left"] + "px",height: "0",width: "0",zIndex: args.zIndex || (s.zIndex || 0),border: "0 solid " + _456,fontSize: "0",visibility: "hidden"};
var _45b = [{}, {top: dims["top"],left: dims["left"]}];
var _45c = {left: [_44b, _44a, _449, _44c, _447, _448, "end" + _448 + "Min", _44b, "end" + _448 + "Max"],right: [_44a, _44b, _449, _44c, _447, _448, "end" + _448 + "Min", _44b, "end" + _448 + "Max"],top: [_449, _44c, _44b, _44a, _448, _447, "end" + _447 + "Min", _449, "end" + _447 + "Max"],bottom: [_44c, _449, _44b, _44a, _448, _447, "end" + _447 + "Min", _449, "end" + _447 + "Max"]};
pn = _45c[dir];
if (typeof _458 != "undefined") {
_458 = Math.max(0, Math.min(1, _458)) / 2;
_455 = 0.4 + (0.5 - _458);
} else {
_455 = Math.min(0.9, Math.max(0.4, dims[pn[5].toLowerCase()] / dims[pn[4].toLowerCase()]));
}
var p0 = _45b[0];
for (var i = 4; i < 6; i++) {
if (axis == "center" || axis == "cube") {
dims["end" + pn[i] + "Min"] = dims[pn[i].toLowerCase()] * _455;
dims["end" + pn[i] + "Max"] = dims[pn[i].toLowerCase()] / _455;
} else {
if (axis == "shortside") {
dims["end" + pn[i] + "Min"] = dims[pn[i].toLowerCase()];
dims["end" + pn[i] + "Max"] = dims[pn[i].toLowerCase()] / _455;
} else {
if (axis == "longside") {
dims["end" + pn[i] + "Min"] = dims[pn[i].toLowerCase()] * _455;
dims["end" + pn[i] + "Max"] = dims[pn[i].toLowerCase()];
}
}
}
}
if (axis == "center") {
p0[pn[2].toLowerCase()] = dims[pn[2].toLowerCase()] - (dims[pn[8]] - dims[pn[6]]) / 4;
} else {
if (axis == "shortside") {
p0[pn[2].toLowerCase()] = dims[pn[2].toLowerCase()] - (dims[pn[8]] - dims[pn[6]]) / 2;
}
}
_452[pn[5].toLowerCase()] = dims[pn[5].toLowerCase()] + "px";
_452[pn[4].toLowerCase()] = "0";
_452[_446 + pn[1] + _447] = dims[pn[4].toLowerCase()] + "px";
_452[_446 + pn[1] + "Color"] = _450;
p0[_446 + pn[1] + _447] = 0;
p0[_446 + pn[1] + "Color"] = _44f;
p0[_446 + pn[2] + _447] = p0[_446 + pn[3] + _447] = axis != "cube" ? (dims["end" + pn[5] + "Max"] - dims["end" + pn[5] + "Min"]) / 2 : dims[pn[6]] / 2;
p0[pn[7].toLowerCase()] = dims[pn[7].toLowerCase()] + dims[pn[4].toLowerCase()] / 2 + (args.shift || 0);
p0[pn[5].toLowerCase()] = dims[pn[6]];
var p1 = _45b[1];
p1[_446 + pn[0] + "Color"] = {start: _44e,end: _451};
p1[_446 + pn[0] + _447] = dims[pn[4].toLowerCase()];
p1[_446 + pn[2] + _447] = 0;
p1[_446 + pn[3] + _447] = 0;
p1[pn[5].toLowerCase()] = {start: dims[pn[6]],end: dims[pn[5].toLowerCase()]};
lang.mixin(hs, _452);
_43d.style(_44d, hs);
_442.body().appendChild(_44d);
var _45d = function() {
_43e.destroy(_44d);
s.backgroundColor = _451;
s.visibility = "visible";
};
if (_457 == "last") {
for (i in p0) {
p0[i] = {start: p0[i]};
}
p0[_446 + pn[1] + "Color"] = {start: _44f,end: _451};
p1 = p0;
}
if (!_457 || _457 == "first") {
_453.push(_443.animateProperty({node: _44d,duration: _454,properties: p0}));
}
if (!_457 || _457 == "last") {
_453.push(_443.animateProperty({node: _44d,duration: _454,properties: p1,onEnd: _45d}));
}
_440.connect(_453[0], "play", function() {
_44d.style.visibility = "visible";
s.visibility = "hidden";
});
return _444.chain(_453);
};
_445.flipCube = function(args) {
var _45e = [], mb = _43f.getMarginBox(args.node), _45f = mb.w / 2, _460 = mb.h / 2, dims = {top: {pName: "height",args: [{whichAnim: "first",dir: "top",shift: -_460}, {whichAnim: "last",dir: "bottom",shift: _460}]},right: {pName: "width",args: [{whichAnim: "first",dir: "right",shift: _45f}, {whichAnim: "last",dir: "left",shift: -_45f}]},bottom: {pName: "height",args: [{whichAnim: "first",dir: "bottom",shift: _460}, {whichAnim: "last",dir: "top",shift: -_460}]},left: {pName: "width",args: [{whichAnim: "first",dir: "left",shift: -_45f}, {whichAnim: "last",dir: "right",shift: _45f}]}};
var d = dims[args.dir || "left"], p = d.args;
args.duration = args.duration ? args.duration * 2 : 500;
args.depth = 0.8;
args.axis = "cube";
for (var i = p.length - 1; i >= 0; i--) {
lang.mixin(args, p[i]);
_45e.push(_445.flip(args));
}
return _444.combine(_45e);
};
_445.flipPage = function(args) {
var n = args.node, _461 = _43d.coords(n, true), x = _461.x, y = _461.y, w = _461.w, h = _461.h, _462 = _43d.style(n, "backgroundColor"), _463 = args.lightColor || "#dddddd", _464 = args.darkColor, _465 = _43e.create("div"), _466 = [], hn = [], dir = args.dir || "right", pn = {left: ["left", "right", "x", "w"],top: ["top", "bottom", "y", "h"],right: ["left", "left", "x", "w"],bottom: ["top", "top", "y", "h"]}, _467 = {right: [1, -1],left: [-1, 1],top: [-1, 1],bottom: [1, -1]};
_43d.style(_465, {position: "absolute",width: w + "px",height: h + "px",top: y + "px",left: x + "px",visibility: "hidden"});
var hs = [];
for (var i = 0; i < 2; i++) {
var r = i % 2, d = r ? pn[dir][1] : dir, wa = r ? "last" : "first", _468 = r ? _462 : _463, _469 = r ? _468 : args.startColor || n.style.backgroundColor;
hn[i] = lang.clone(_465);
var _46a = function(x) {
return function() {
_43e.destroy(hn[x]);
};
}(i);
_442.body().appendChild(hn[i]);
hs[i] = {backgroundColor: r ? _469 : _462};
hs[i][pn[dir][0]] = _461[pn[dir][2]] + _467[dir][0] * i * _461[pn[dir][3]] + "px";
_43d.style(hn[i], hs[i]);
_466.push(dojox.fx.flip({node: hn[i],dir: d,axis: "shortside",depth: args.depth,duration: args.duration / 2,shift: _467[dir][i] * _461[pn[dir][3]] / 2,darkColor: _464,lightColor: _463,whichAnim: wa,endColor: _468}));
_440.connect(_466[i], "onEnd", _46a);
}
return _444.chain(_466);
};
_445.flipGrid = function(args) {
var rows = args.rows || 4, cols = args.cols || 4, _46b = [], _46c = _43e.create("div"), n = args.node, _46d = _43d.coords(n, true), x = _46d.x, y = _46d.y, nw = _46d.w, nh = _46d.h, w = _46d.w / cols, h = _46d.h / rows, _46e = [];
_43d.style(_46c, {position: "absolute",width: w + "px",height: h + "px",backgroundColor: _43d.style(n, "backgroundColor")});
for (var i = 0; i < rows; i++) {
var r = i % 2, d = r ? "right" : "left", _46f = r ? 1 : -1;
var cn = lang.clone(n);
_43d.style(cn, {position: "absolute",width: nw + "px",height: nh + "px",top: y + "px",left: x + "px",clip: "rect(" + i * h + "px," + nw + "px," + nh + "px,0)"});
_442.body().appendChild(cn);
_46b[i] = [];
for (var j = 0; j < cols; j++) {
var hn = lang.clone(_46c), l = r ? j : cols - (j + 1);
var _470 = function(xn, _471, _472) {
return function() {
if (!(_471 % 2)) {
_43d.style(xn, {clip: "rect(" + _471 * h + "px," + (nw - (_472 + 1) * w) + "px," + ((_471 + 1) * h) + "px,0px)"});
} else {
_43d.style(xn, {clip: "rect(" + _471 * h + "px," + nw + "px," + ((_471 + 1) * h) + "px," + ((_472 + 1) * w) + "px)"});
}
};
}(cn, i, j);
_442.body().appendChild(hn);
_43d.style(hn, {left: x + l * w + "px",top: y + i * h + "px",visibility: "hidden"});
var a = dojox.fx.flipPage({node: hn,dir: d,duration: args.duration || 900,shift: _46f * w / 2,depth: 0.2,darkColor: args.darkColor,lightColor: args.lightColor,startColor: args.startColor || args.node.style.backgroundColor}), _473 = function(xn) {
return function() {
_43e.destroy(xn);
};
}(hn);
_440.connect(a, "play", this, _470);
_440.connect(a, "play", this, _473);
_46b[i].push(a);
}
_46e.push(_444.chain(_46b[i]));
}
_440.connect(_46e[0], "play", function() {
_43d.style(n, {visibility: "hidden"});
});
return _444.combine(_46e);
};
return _445;
});
},"dojox/mobile/IconContainer": function() {
define("dojox/mobile/IconContainer", ["dojo/_base/array", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-construct", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase", "./IconItem", "./Heading", "./View"], function(_474, _475, lang, win, _476, _477, _478, _479, _47a, _47b, View) {
return _475("dojox.mobile.IconContainer", [_479, _478, _477], {defaultIcon: "",transition: "below",pressedIconOpacity: 0.4,iconBase: "",iconPos: "",back: "Home",label: "My Application",single: false,editable: false,tag: "ul",baseClass: "mblIconContainer",editableMixinClass: "dojox/mobile/_EditableIconMixin",iconItemPaneContainerClass: "dojox/mobile/Container",iconItemPaneContainerProps: null,iconItemPaneClass: "dojox/mobile/_IconItemPane",iconItemPaneProps: null,buildRendering: function() {
this.domNode = this.containerNode = this.srcNodeRef || _476.create(this.tag);
this._terminator = _476.create(this.tag === "ul" ? "li" : "div", {className: "mblIconItemTerminator"}, this.domNode);
this.inherited(arguments);
},postCreate: function() {
if (this.editable && !this.startEdit) {
require([this.editableMixinClass], lang.hitch(this, function(_47c) {
_475.safeMixin(this, new _47c());
this.set("editable", this.editable);
}));
}
},startup: function() {
if (this._started) {
return;
}
require([this.iconItemPaneContainerClass], lang.hitch(this, function(_47d) {
this.paneContainerWidget = new _47d(this.iconItemPaneContainerProps);
if (this.transition === "below") {
_476.place(this.paneContainerWidget.domNode, this.domNode, "after");
} else {
var view = this.appView = new View({id: this.id + "_mblApplView"});
var _47e = this;
view.onAfterTransitionIn = function(_47f, dir, _480, _481, _482) {
_47e._opening._open_1();
};
view.domNode.style.visibility = "hidden";
var _483 = view._heading = new _47b({back: this._cv ? this._cv(this.back) : this.back,label: this._cv ? this._cv(this.label) : this.label,moveTo: this.domNode.parentNode.id,transition: this.transition == "zoomIn" ? "zoomOut" : this.transition});
view.addChild(_483);
view.addChild(this.paneContainerWidget);
var _484;
for (var w = this.getParent(); w; w = w.getParent()) {
if (w instanceof View) {
_484 = w.domNode.parentNode;
break;
}
}
if (!_484) {
_484 = win.body();
}
_484.appendChild(view.domNode);
view.startup();
}
}));
this.inherited(arguments);
},closeAll: function() {
_474.forEach(this.getChildren(), function(w) {
w.close(true);
}, this);
},addChild: function(_485, _486) {
this.inherited(arguments);
this.domNode.appendChild(this._terminator);
},removeChild: function(_487) {
var _488 = (typeof _487 == "number") ? _487 : _487.getIndexInParent();
this.paneContainerWidget.removeChild(_488);
this.inherited(arguments);
},_setLabelAttr: function(text) {
if (!this.appView) {
return;
}
this.label = text;
var s = this._cv ? this._cv(text) : text;
this.appView._heading.set("label", s);
}});
});
},"dojox/mobile/IconItem": function() {
define("dojox/mobile/IconItem", ["dojo/_base/declare", "dojo/_base/event", "dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-geometry", "dojo/dom-style", "./_ItemBase", "./Badge", "./TransitionEvent", "./iconUtils", "./lazyLoadUtils", "./viewRegistry"], function(_489, _48a, lang, has, win, _48b, _48c, _48d, _48e, _48f, _490, _491, _492, _493, _494) {
return _489("dojox.mobile.IconItem", _48f, {lazy: false,requires: "",timeout: 10,content: "",badge: "",badgeClass: "mblDomButtonRedBadge",deletable: true,deleteIcon: "",tag: "li",paramsToInherit: "transition,icon,deleteIcon,badgeClass,deleteIconTitle,deleteIconRole",baseClass: "mblIconItem",_selStartMethod: "touch",_selEndMethod: "none",destroy: function() {
if (this.badgeObj) {
delete this.badgeObj;
}
this.inherited(arguments);
},buildRendering: function() {
this.domNode = this.srcNodeRef || _48c.create(this.tag);
if (this.srcNodeRef) {
this._tmpNode = _48c.create("div");
for (var i = 0, len = this.srcNodeRef.childNodes.length; i < len; i++) {
this._tmpNode.appendChild(this.srcNodeRef.firstChild);
}
}
this.iconDivNode = _48c.create("div", {className: "mblIconArea"}, this.domNode);
this.iconParentNode = _48c.create("div", {className: "mblIconAreaInner"}, this.iconDivNode);
this.labelNode = _48c.create("span", {className: "mblIconAreaTitle"}, this.iconDivNode);
this.inherited(arguments);
},startup: function() {
if (this._started) {
return;
}
var p = this.getParent();
require([p.iconItemPaneClass], lang.hitch(this, function(_495) {
var w = this.paneWidget = new _495(p.iconItemPaneProps);
this.containerNode = w.containerNode;
if (this._tmpNode) {
for (var i = 0, len = this._tmpNode.childNodes.length; i < len; i++) {
w.containerNode.appendChild(this._tmpNode.firstChild);
}
this._tmpNode = null;
}
p.paneContainerWidget.addChild(w, this.getIndexInParent());
w.set("label", this.label);
this._clickCloseHandle = this.connect(w.closeIconNode, "onclick", "_closeIconClicked");
this._keydownCloseHandle = this.connect(w.closeIconNode, "onkeydown", "_closeIconClicked");
}));
this.inherited(arguments);
if (!this._isOnLine) {
this._isOnLine = true;
this.set("icon", this._pendingIcon !== undefined ? this._pendingIcon : this.icon);
delete this._pendingIcon;
}
if (!this.icon && p.defaultIcon) {
this.set("icon", p.defaultIcon);
}
this._dragstartHandle = this.connect(this.domNode, "ondragstart", _48a.stop);
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onClick");
},highlight: function(_496) {
_48b.add(this.iconDivNode, "mblVibrate");
_496 = (_496 !== undefined) ? _496 : this.timeout;
if (_496 > 0) {
var _497 = this;
setTimeout(function() {
_497.unhighlight();
}, _496 * 1000);
}
},unhighlight: function() {
_48b.remove(this.iconDivNode, "mblVibrate");
},isOpen: function(e) {
return this.paneWidget.isOpen();
},_onClick: function(e) {
if (this.getParent().isEditing || e && e.type === "keydown" && e.keyCode !== 13) {
return;
}
if (this.onClick(e) === false) {
return;
}
this.defaultClickAction(e);
},onClick: function() {
},_onNewWindowOpened: function(e) {
this.set("selected", false);
},_prepareForTransition: function(e, _498) {
if (_498) {
setTimeout(lang.hitch(this, function(d) {
this.set("selected", false);
}), 1500);
return true;
} else {
if (this.getParent().transition === "below" && this.isOpen()) {
this.close();
} else {
this.open(e);
}
return false;
}
},_closeIconClicked: function(e) {
if (e) {
if (e.type === "keydown" && e.keyCode !== 13) {
return;
}
if (this.closeIconClicked(e) === false) {
return;
}
setTimeout(lang.hitch(this, function(d) {
this._closeIconClicked();
}), 0);
return;
}
this.close();
},closeIconClicked: function() {
},open: function(e) {
var _499 = this.getParent();
if (this.transition === "below") {
if (_499.single) {
_499.closeAll();
}
this._open_1();
} else {
_499._opening = this;
if (_499.single) {
this.paneWidget.closeHeaderNode.style.display = "none";
if (!this.isOpen()) {
_499.closeAll();
}
_499.appView._heading.set("label", this.label);
}
this.moveTo = _499.id + "_mblApplView";
new _491(this.domNode, this.getTransOpts(), e).dispatch();
}
},_open_1: function() {
this.paneWidget.show();
this.unhighlight();
if (this.lazy) {
_493.instantiateLazyWidgets(this.containerNode, this.requires);
this.lazy = false;
}
this.scrollIntoView(this.paneWidget.domNode);
this.onOpen();
},scrollIntoView: function(node) {
var s = _494.getEnclosingScrollable(node);
if (s) {
s.scrollIntoView(node, true);
} else {
win.global.scrollBy(0, _48d.position(node, false).y);
}
},close: function(_49a) {
if (!this.isOpen()) {
return;
}
this.set("selected", false);
if (has("webkit") && !_49a) {
var _49b = this.paneWidget.domNode;
if (this.getParent().transition == "below") {
_48b.add(_49b, "mblCloseContent mblShrink");
var _49c = _48d.position(_49b, true);
var _49d = _48d.position(this.domNode, true);
var _49e = (_49d.x + _49d.w / 2 - _49c.x) + "px " + (_49d.y + _49d.h / 2 - _49c.y) + "px";
_48e.set(_49b, {webkitTransformOrigin: _49e});
} else {
_48b.add(_49b, "mblCloseContent mblShrink0");
}
} else {
this.paneWidget.hide();
}
this.onClose();
},onOpen: function() {
},onClose: function() {
},_setLabelAttr: function(text) {
this.label = text;
var s = this._cv ? this._cv(text) : text;
this.labelNode.innerHTML = s;
if (this.paneWidget) {
this.paneWidget.set("label", text);
}
},_getBadgeAttr: function() {
return this.badgeObj ? this.badgeObj.getValue() : null;
},_setBadgeAttr: function(_49f) {
if (!this.badgeObj) {
this.badgeObj = new _490({fontSize: 14,className: this.badgeClass});
_48e.set(this.badgeObj.domNode, {position: "absolute",top: "-2px",right: "2px"});
}
this.badgeObj.setValue(_49f);
if (_49f) {
this.iconDivNode.appendChild(this.badgeObj.domNode);
} else {
this.iconDivNode.removeChild(this.badgeObj.domNode);
}
},_setDeleteIconAttr: function(icon) {
if (!this.getParent()) {
return;
}
this._set("deleteIcon", icon);
icon = this.deletable ? icon : "";
this.deleteIconNode = _492.setIcon(icon, this.deleteIconPos, this.deleteIconNode, this.deleteIconTitle || this.alt, this.iconDivNode);
if (this.deleteIconNode) {
_48b.add(this.deleteIconNode, "mblIconItemDeleteIcon");
if (this.deleteIconRole) {
this.deleteIconNode.setAttribute("role", this.deleteIconRole);
}
}
},_setContentAttr: function(data) {
var root;
if (!this.paneWidget) {
if (!this._tmpNode) {
this._tmpNode = _48c.create("div");
}
root = this._tmpNode;
} else {
root = this.paneWidget.containerNode;
}
if (typeof data === "object") {
_48c.empty(root);
root.appendChild(data);
} else {
root.innerHTML = data;
}
},_setSelectedAttr: function(_4a0) {
this.inherited(arguments);
_48e.set(this.iconNode, "opacity", _4a0 ? this.getParent().pressedIconOpacity : 1);
}});
});
},"dojox/mobile/Badge": function() {
define("dojox/mobile/Badge", ["dojo/_base/declare", "dojo/_base/lang", "dojo/dom-class", "dojo/dom-construct", "./iconUtils"], function(_4a1, lang, _4a2, _4a3, _4a4) {
return _4a1("dojox.mobile.Badge", null, {value: "0",className: "mblDomButtonRedBadge",fontSize: 16,constructor: function(_4a5, node) {
if (_4a5) {
lang.mixin(this, _4a5);
}
this.domNode = node ? node : _4a3.create("div");
_4a2.add(this.domNode, "mblBadge");
if (this.domNode.className.indexOf("mblDomButton") === -1) {
_4a2.add(this.domNode, this.className);
}
if (this.fontSize !== 16) {
this.domNode.style.fontSize = this.fontSize + "px";
}
_4a4.createDomButton(this.domNode);
this.setValue(this.value);
},getValue: function() {
return this.domNode.firstChild.innerHTML || "";
},setValue: function(_4a6) {
this.domNode.firstChild.innerHTML = _4a6;
}});
});
},"dojox/mobile/lazyLoadUtils": function() {
define("dojox/mobile/lazyLoadUtils", ["dojo/_base/kernel", "dojo/_base/array", "dojo/_base/config", "dojo/_base/window", "dojo/_base/Deferred", "dojo/ready"], function(dojo, _4a7, _4a8, win, _4a9, _4aa) {
var _4ab = function() {
this._lazyNodes = [];
var _4ac = this;
if (_4a8.parseOnLoad) {
_4aa(90, function() {
var _4ad = _4a7.filter(win.body().getElementsByTagName("*"), function(n) {
return n.getAttribute("lazy") === "true" || (n.getAttribute("data-dojo-props") || "").match(/lazy\s*:\s*true/);
});
var i, j, _4ae, s, n;
for (i = 0; i < _4ad.length; i++) {
_4a7.forEach(["dojoType", "data-dojo-type"], function(a) {
_4ae = _4a7.filter(_4ad[i].getElementsByTagName("*"), function(n) {
return n.getAttribute(a);
});
for (j = 0; j < _4ae.length; j++) {
n = _4ae[j];
n.setAttribute("__" + a, n.getAttribute(a));
n.removeAttribute(a);
_4ac._lazyNodes.push(n);
}
});
}
});
}
_4aa(function() {
for (var i = 0; i < _4ac._lazyNodes.length; i++) {
var n = _4ac._lazyNodes[i];
_4a7.forEach(["dojoType", "data-dojo-type"], function(a) {
if (n.getAttribute("__" + a)) {
n.setAttribute(a, n.getAttribute("__" + a));
n.removeAttribute("__" + a);
}
});
}
delete _4ac._lazyNodes;
});
this.instantiateLazyWidgets = function(root, _4af, _4b0) {
var d = new _4a9();
var req = _4af ? _4af.split(/,/) : [];
var _4b1 = root.getElementsByTagName("*");
var len = _4b1.length;
for (var i = 0; i < len; i++) {
var s = _4b1[i].getAttribute("dojoType") || _4b1[i].getAttribute("data-dojo-type");
if (s) {
req.push(s);
var m = _4b1[i].getAttribute("data-dojo-mixins"), _4b2 = m ? m.split(/, */) : [];
req = req.concat(_4b2);
}
}
if (req.length === 0) {
return true;
}
if (dojo.require) {
_4a7.forEach(req, function(c) {
dojo["require"](c);
});
dojo.parser.parse(root);
if (_4b0) {
_4b0(root);
}
return true;
} else {
req = _4a7.map(req, function(s) {
return s.replace(/\./g, "/");
});
require(req, function() {
dojo.parser.parse(root);
if (_4b0) {
_4b0(root);
}
d.resolve(true);
});
}
return d;
};
};
return new _4ab();
});
},"dojox/mobile/ScrollableView": function() {
define("dojox/mobile/ScrollableView", ["dojo/_base/array", "dojo/_base/declare", "dojo/dom-class", "dojo/dom-construct", "dijit/registry", "./View", "./_ScrollableMixin"], function(_4b3, _4b4, _4b5, _4b6, _4b7, View, _4b8) {
return _4b4("dojox.mobile.ScrollableView", [View, _4b8], {scrollableParams: null,keepScrollPos: false,constructor: function() {
this.scrollableParams = {noResize: true};
},buildRendering: function() {
this.inherited(arguments);
_4b5.add(this.domNode, "mblScrollableView");
this.domNode.style.overflow = "hidden";
this.domNode.style.top = "0px";
this.containerNode = _4b6.create("div", {className: "mblScrollableViewContainer"}, this.domNode);
this.containerNode.style.position = "absolute";
this.containerNode.style.top = "0px";
if (this.scrollDir === "v") {
this.containerNode.style.width = "100%";
}
},startup: function() {
if (this._started) {
return;
}
this.reparent();
this.inherited(arguments);
},resize: function() {
this.inherited(arguments);
_4b3.forEach(this.getChildren(), function(_4b9) {
if (_4b9.resize) {
_4b9.resize();
}
});
},isTopLevel: function(e) {
var _4ba = this.getParent && this.getParent();
return (!_4ba || !_4ba.resize);
},addFixedBar: function(_4bb) {
var c = _4bb.domNode;
var _4bc = this.checkFixedBar(c, true);
if (!_4bc) {
return;
}
this.domNode.appendChild(c);
if (_4bc === "top") {
this.fixedHeaderHeight = c.offsetHeight;
this.isLocalHeader = true;
} else {
if (_4bc === "bottom") {
this.fixedFooterHeight = c.offsetHeight;
this.isLocalFooter = true;
c.style.bottom = "0px";
}
}
this.resize();
},reparent: function() {
var i, idx, len, c;
for (i = 0, idx = 0, len = this.domNode.childNodes.length; i < len; i++) {
c = this.domNode.childNodes[idx];
if (c === this.containerNode || this.checkFixedBar(c, true)) {
idx++;
continue;
}
this.containerNode.appendChild(this.domNode.removeChild(c));
}
},onAfterTransitionIn: function(_4bd, dir, _4be, _4bf, _4c0) {
this.flashScrollBar();
},getChildren: function() {
var _4c1 = this.inherited(arguments);
if (this.fixedHeader && this.fixedHeader.parentNode === this.domNode) {
_4c1.push(_4b7.byNode(this.fixedHeader));
}
if (this.fixedFooter && this.fixedFooter.parentNode === this.domNode) {
_4c1.push(_4b7.byNode(this.fixedFooter));
}
return _4c1;
}});
});
},"dojox/mobile/_ScrollableMixin": function() {
define("dojox/mobile/_ScrollableMixin", ["dojo/_base/kernel", "dojo/_base/config", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom", "dojo/dom-class", "dijit/registry", "./scrollable"], function(dojo, _4c2, _4c3, lang, win, dom, _4c4, _4c5, _4c6) {
var cls = _4c3("dojox.mobile._ScrollableMixin", _4c6, {fixedHeader: "",fixedFooter: "",scrollableParams: null,allowNestedScrolls: true,appBars: true,constructor: function() {
this.scrollableParams = {};
},destroy: function() {
this.cleanup();
this.inherited(arguments);
},startup: function() {
if (this._started) {
return;
}
this.findAppBars();
var node, _4c7 = this.scrollableParams;
if (this.fixedHeader) {
node = dom.byId(this.fixedHeader);
if (node.parentNode == this.domNode) {
this.isLocalHeader = true;
}
_4c7.fixedHeaderHeight = node.offsetHeight;
}
if (this.fixedFooter) {
node = dom.byId(this.fixedFooter);
if (node.parentNode == this.domNode) {
this.isLocalFooter = true;
node.style.bottom = "0px";
}
_4c7.fixedFooterHeight = node.offsetHeight;
}
this.scrollType = this.scrollType || _4c2["mblScrollableScrollType"] || 0;
this.init(_4c7);
if (this.allowNestedScrolls) {
for (var p = this.getParent(); p; p = p.getParent()) {
if (p && p.scrollableParams) {
this.dirLock = true;
p.dirLock = true;
break;
}
}
}
this._resizeHandle = this.subscribe("/dojox/mobile/afterResizeAll", function() {
if (this.domNode.style.display === "none") {
return;
}
var elem = win.doc.activeElement;
if (this.isFormElement(elem) && dom.isDescendant(elem, this.containerNode)) {
this.scrollIntoView(elem);
}
});
this.inherited(arguments);
},findAppBars: function() {
if (!this.appBars) {
return;
}
var i, len, c;
for (i = 0, len = win.body().childNodes.length; i < len; i++) {
c = win.body().childNodes[i];
this.checkFixedBar(c, false);
}
if (this.domNode.parentNode) {
for (i = 0, len = this.domNode.parentNode.childNodes.length; i < len; i++) {
c = this.domNode.parentNode.childNodes[i];
this.checkFixedBar(c, false);
}
}
this.fixedFooterHeight = this.fixedFooter ? this.fixedFooter.offsetHeight : 0;
},checkFixedBar: function(node, _4c8) {
if (node.nodeType === 1) {
var _4c9 = node.getAttribute("fixed") || (_4c5.byNode(node) && _4c5.byNode(node).fixed);
if (_4c9 === "top") {
_4c4.add(node, "mblFixedHeaderBar");
if (_4c8) {
node.style.top = "0px";
this.fixedHeader = node;
}
return _4c9;
} else {
if (_4c9 === "bottom") {
_4c4.add(node, "mblFixedBottomBar");
this.fixedFooter = node;
return _4c9;
}
}
}
return null;
}});
return cls;
});
},"dojox/mobile/scrollable": function() {
define("dojox/mobile/scrollable", ["dojo/_base/kernel", "dojo/_base/connect", "dojo/_base/event", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "./sniff"], function(dojo, _4ca, _4cb, lang, win, _4cc, _4cd, _4ce, has) {
var dm = lang.getObject("dojox.mobile", true);
has.add("translate3d", function() {
if (has("webkit")) {
var elem = win.doc.createElement("div");
elem.style.webkitTransform = "translate3d(0px,1px,0px)";
win.doc.documentElement.appendChild(elem);
var v = win.doc.defaultView.getComputedStyle(elem, "")["-webkit-transform"];
var _4cf = v && v.indexOf("matrix") === 0;
win.doc.documentElement.removeChild(elem);
return _4cf;
}
});
var _4d0 = function() {
};
lang.extend(_4d0, {fixedHeaderHeight: 0,fixedFooterHeight: 0,isLocalFooter: false,scrollBar: true,scrollDir: "v",weight: 0.6,fadeScrollBar: true,disableFlashScrollBar: false,threshold: 4,constraint: true,touchNode: null,propagatable: true,dirLock: false,height: "",scrollType: 0,init: function(_4d1) {
if (_4d1) {
for (var p in _4d1) {
if (_4d1.hasOwnProperty(p)) {
this[p] = ((p == "domNode" || p == "containerNode") && typeof _4d1[p] == "string") ? win.doc.getElementById(_4d1[p]) : _4d1[p];
}
}
}
this.touchNode = this.touchNode || this.containerNode;
this._v = (this.scrollDir.indexOf("v") != -1);
this._h = (this.scrollDir.indexOf("h") != -1);
this._f = (this.scrollDir == "f");
this._ch = [];
this._ch.push(_4ca.connect(this.touchNode, has("touch") ? "ontouchstart" : "onmousedown", this, "onTouchStart"));
if (has("webkit")) {
this._useTopLeft = this.scrollType ? this.scrollType === 2 : has("android") < 3;
if (!this._useTopLeft) {
this._useTransformTransition = this.scrollType ? this.scrollType === 3 : has("iphone") >= 6;
}
if (!this._useTopLeft) {
if (this._useTransformTransition) {
this._ch.push(_4ca.connect(this.domNode, "webkitTransitionEnd", this, "onFlickAnimationEnd"));
this._ch.push(_4ca.connect(this.domNode, "webkitTransitionStart", this, "onFlickAnimationStart"));
} else {
this._ch.push(_4ca.connect(this.domNode, "webkitAnimationEnd", this, "onFlickAnimationEnd"));
this._ch.push(_4ca.connect(this.domNode, "webkitAnimationStart", this, "onFlickAnimationStart"));
for (var i = 0; i < 3; i++) {
this.setKeyframes(null, null, i);
}
}
if (has("translate3d")) {
_4ce.set(this.containerNode, "webkitTransform", "translate3d(0,0,0)");
}
} else {
this._ch.push(_4ca.connect(this.domNode, "webkitTransitionEnd", this, "onFlickAnimationEnd"));
this._ch.push(_4ca.connect(this.domNode, "webkitTransitionStart", this, "onFlickAnimationStart"));
}
}
this._speed = {x: 0,y: 0};
this._appFooterHeight = 0;
if (this.isTopLevel() && !this.noResize) {
this.resize();
}
var _4d2 = this;
setTimeout(function() {
_4d2.flashScrollBar();
}, 600);
},isTopLevel: function() {
return true;
},cleanup: function() {
if (this._ch) {
for (var i = 0; i < this._ch.length; i++) {
_4ca.disconnect(this._ch[i]);
}
this._ch = null;
}
},findDisp: function(node) {
if (!node.parentNode) {
return null;
}
if (node.nodeType === 1 && _4cc.contains(node, "mblSwapView") && node.style.display !== "none") {
return node;
}
var _4d3 = node.parentNode.childNodes;
for (var i = 0; i < _4d3.length; i++) {
var n = _4d3[i];
if (n.nodeType === 1 && _4cc.contains(n, "mblView") && n.style.display !== "none") {
return n;
}
}
return node;
},getScreenSize: function() {
return {h: win.global.innerHeight || win.doc.documentElement.clientHeight || win.doc.documentElement.offsetHeight,w: win.global.innerWidth || win.doc.documentElement.clientWidth || win.doc.documentElement.offsetWidth};
},resize: function(e) {
this._appFooterHeight = (this.fixedFooterHeight && !this.isLocalFooter) ? this.fixedFooterHeight : 0;
if (this.isLocalHeader) {
this.containerNode.style.marginTop = this.fixedHeaderHeight + "px";
}
var top = 0;
for (var n = this.domNode; n && n.tagName != "BODY"; n = n.offsetParent) {
n = this.findDisp(n);
if (!n) {
break;
}
top += n.offsetTop;
}
var h, _4d4 = this.getScreenSize().h, dh = _4d4 - top - this._appFooterHeight;
if (this.height === "inherit") {
if (this.domNode.offsetParent) {
h = this.domNode.offsetParent.offsetHeight + "px";
}
} else {
if (this.height === "auto") {
var _4d5 = this.domNode.offsetParent;
if (_4d5) {
this.domNode.style.height = "0px";
var _4d6 = _4d5.getBoundingClientRect(), _4d7 = this.domNode.getBoundingClientRect(), _4d8 = _4d6.bottom - this._appFooterHeight;
if (_4d7.bottom >= _4d8) {
dh = _4d4 - (_4d7.top - _4d6.top) - this._appFooterHeight;
} else {
dh = _4d8 - _4d7.bottom;
}
}
var _4d9 = Math.max(this.domNode.scrollHeight, this.containerNode.scrollHeight);
h = (_4d9 ? Math.min(_4d9, dh) : dh) + "px";
} else {
if (this.height) {
h = this.height;
}
}
}
if (!h) {
h = dh + "px";
}
if (h.charAt(0) !== "-" && h !== "default") {
this.domNode.style.height = h;
}
this.onTouchEnd();
},onFlickAnimationStart: function(e) {
_4cb.stop(e);
},onFlickAnimationEnd: function(e) {
var an = e && e.animationName;
if (an && an.indexOf("scrollableViewScroll2") === -1) {
if (an.indexOf("scrollableViewScroll0") !== -1) {
if (this._scrollBarNodeV) {
_4cc.remove(this._scrollBarNodeV, "mblScrollableScrollTo0");
}
} else {
if (an.indexOf("scrollableViewScroll1") !== -1) {
if (this._scrollBarNodeH) {
_4cc.remove(this._scrollBarNodeH, "mblScrollableScrollTo1");
}
} else {
if (this._scrollBarNodeV) {
this._scrollBarNodeV.className = "";
}
if (this._scrollBarNodeH) {
this._scrollBarNodeH.className = "";
}
}
}
return;
}
if (this._useTransformTransition || this._useTopLeft) {
var n = e.target;
if (n === this._scrollBarV || n === this._scrollBarH) {
var cls = "mblScrollableScrollTo" + (n === this._scrollBarV ? "0" : "1");
if (_4cc.contains(n, cls)) {
_4cc.remove(n, cls);
} else {
n.className = "";
}
return;
}
}
if (e && e.srcElement) {
_4cb.stop(e);
}
this.stopAnimation();
if (this._bounce) {
var _4da = this;
var _4db = _4da._bounce;
setTimeout(function() {
_4da.slideTo(_4db, 0.3, "ease-out");
}, 0);
_4da._bounce = undefined;
} else {
this.hideScrollBar();
this.removeCover();
}
},isFormElement: function(node) {
if (node && node.nodeType !== 1) {
node = node.parentNode;
}
if (!node || node.nodeType !== 1) {
return false;
}
var t = node.tagName;
return (t === "SELECT" || t === "INPUT" || t === "TEXTAREA" || t === "BUTTON");
},onTouchStart: function(e) {
if (this.disableTouchScroll) {
return;
}
if (this._conn && (new Date()).getTime() - this.startTime < 500) {
return;
}
if (!this._conn) {
this._conn = [];
this._conn.push(_4ca.connect(win.doc, has("touch") ? "ontouchmove" : "onmousemove", this, "onTouchMove"));
this._conn.push(_4ca.connect(win.doc, has("touch") ? "ontouchend" : "onmouseup", this, "onTouchEnd"));
}
this._aborted = false;
if (_4cc.contains(this.containerNode, "mblScrollableScrollTo2")) {
this.abort();
} else {
if (this._scrollBarNodeV) {
this._scrollBarNodeV.className = "";
}
if (this._scrollBarNodeH) {
this._scrollBarNodeH.className = "";
}
}
this.touchStartX = e.touches ? e.touches[0].pageX : e.clientX;
this.touchStartY = e.touches ? e.touches[0].pageY : e.clientY;
this.startTime = (new Date()).getTime();
this.startPos = this.getPos();
this._dim = this.getDim();
this._time = [0];
this._posX = [this.touchStartX];
this._posY = [this.touchStartY];
this._locked = false;
if (!this.isFormElement(e.target)) {
this.propagatable ? e.preventDefault() : _4cb.stop(e);
}
},onTouchMove: function(e) {
if (this._locked) {
return;
}
var x = e.touches ? e.touches[0].pageX : e.clientX;
var y = e.touches ? e.touches[0].pageY : e.clientY;
var dx = x - this.touchStartX;
var dy = y - this.touchStartY;
var to = {x: this.startPos.x + dx,y: this.startPos.y + dy};
var dim = this._dim;
dx = Math.abs(dx);
dy = Math.abs(dy);
if (this._time.length == 1) {
if (this.dirLock) {
if (this._v && !this._h && dx >= this.threshold && dx >= dy || (this._h || this._f) && !this._v && dy >= this.threshold && dy >= dx) {
this._locked = true;
return;
}
}
if (this._v && this._h) {
if (dy < this.threshold && dx < this.threshold) {
return;
}
} else {
if (this._v && dy < this.threshold || (this._h || this._f) && dx < this.threshold) {
return;
}
}
this.addCover();
this.showScrollBar();
}
var _4dc = this.weight;
if (this._v && this.constraint) {
if (to.y > 0) {
to.y = Math.round(to.y * _4dc);
} else {
if (to.y < -dim.o.h) {
if (dim.c.h < dim.d.h) {
to.y = Math.round(to.y * _4dc);
} else {
to.y = -dim.o.h - Math.round((-dim.o.h - to.y) * _4dc);
}
}
}
}
if ((this._h || this._f) && this.constraint) {
if (to.x > 0) {
to.x = Math.round(to.x * _4dc);
} else {
if (to.x < -dim.o.w) {
if (dim.c.w < dim.d.w) {
to.x = Math.round(to.x * _4dc);
} else {
to.x = -dim.o.w - Math.round((-dim.o.w - to.x) * _4dc);
}
}
}
}
this.scrollTo(to);
var max = 10;
var n = this._time.length;
if (n >= 2) {
var d0, d1;
if (this._v && !this._h) {
d0 = this._posY[n - 1] - this._posY[n - 2];
d1 = y - this._posY[n - 1];
} else {
if (!this._v && this._h) {
d0 = this._posX[n - 1] - this._posX[n - 2];
d1 = x - this._posX[n - 1];
}
}
if (d0 * d1 < 0) {
this._time = [this._time[n - 1]];
this._posX = [this._posX[n - 1]];
this._posY = [this._posY[n - 1]];
n = 1;
}
}
if (n == max) {
this._time.shift();
this._posX.shift();
this._posY.shift();
}
this._time.push((new Date()).getTime() - this.startTime);
this._posX.push(x);
this._posY.push(y);
},onTouchEnd: function(e) {
if (this._locked) {
return;
}
var _4dd = this._speed = {x: 0,y: 0};
var dim = this._dim;
var pos = this.getPos();
var to = {};
if (e) {
if (!this._conn) {
return;
}
for (var i = 0; i < this._conn.length; i++) {
_4ca.disconnect(this._conn[i]);
}
this._conn = null;
var n = this._time.length;
var _4de = false;
if (!this._aborted) {
if (n <= 1) {
_4de = true;
} else {
if (n == 2 && Math.abs(this._posY[1] - this._posY[0]) < 4 && has("touch")) {
_4de = true;
}
}
}
if (_4de) {
this.hideScrollBar();
this.removeCover();
if (has("touch") && !this.isFormElement(e.target) && !(has("android") >= 4.1)) {
var elem = e.target;
if (elem.nodeType != 1) {
elem = elem.parentNode;
}
var ev = win.doc.createEvent("MouseEvents");
ev.initMouseEvent("click", true, true, win.global, 1, e.screenX, e.screenY, e.clientX, e.clientY);
setTimeout(function() {
elem.dispatchEvent(ev);
}, 0);
}
return;
}
_4dd = this._speed = this.getSpeed();
} else {
if (pos.x == 0 && pos.y == 0) {
return;
}
dim = this.getDim();
}
if (this._v) {
to.y = pos.y + _4dd.y;
}
if (this._h || this._f) {
to.x = pos.x + _4dd.x;
}
if (this.adjustDestination(to, pos, dim) === false) {
return;
}
if (this.scrollDir == "v" && dim.c.h < dim.d.h) {
this.slideTo({y: 0}, 0.3, "ease-out");
return;
} else {
if (this.scrollDir == "h" && dim.c.w < dim.d.w) {
this.slideTo({x: 0}, 0.3, "ease-out");
return;
} else {
if (this._v && this._h && dim.c.h < dim.d.h && dim.c.w < dim.d.w) {
this.slideTo({x: 0,y: 0}, 0.3, "ease-out");
return;
}
}
}
var _4df, _4e0 = "ease-out";
var _4e1 = {};
if (this._v && this.constraint) {
if (to.y > 0) {
if (pos.y > 0) {
_4df = 0.3;
to.y = 0;
} else {
to.y = Math.min(to.y, 20);
_4e0 = "linear";
_4e1.y = 0;
}
} else {
if (-_4dd.y > dim.o.h - (-pos.y)) {
if (pos.y < -dim.o.h) {
_4df = 0.3;
to.y = dim.c.h <= dim.d.h ? 0 : -dim.o.h;
} else {
to.y = Math.max(to.y, -dim.o.h - 20);
_4e0 = "linear";
_4e1.y = -dim.o.h;
}
}
}
}
if ((this._h || this._f) && this.constraint) {
if (to.x > 0) {
if (pos.x > 0) {
_4df = 0.3;
to.x = 0;
} else {
to.x = Math.min(to.x, 20);
_4e0 = "linear";
_4e1.x = 0;
}
} else {
if (-_4dd.x > dim.o.w - (-pos.x)) {
if (pos.x < -dim.o.w) {
_4df = 0.3;
to.x = dim.c.w <= dim.d.w ? 0 : -dim.o.w;
} else {
to.x = Math.max(to.x, -dim.o.w - 20);
_4e0 = "linear";
_4e1.x = -dim.o.w;
}
}
}
}
this._bounce = (_4e1.x !== undefined || _4e1.y !== undefined) ? _4e1 : undefined;
if (_4df === undefined) {
var _4e2, _4e3;
if (this._v && this._h) {
_4e3 = Math.sqrt(_4dd.x * _4dd.x + _4dd.y * _4dd.y);
_4e2 = Math.sqrt(Math.pow(to.y - pos.y, 2) + Math.pow(to.x - pos.x, 2));
} else {
if (this._v) {
_4e3 = _4dd.y;
_4e2 = to.y - pos.y;
} else {
if (this._h) {
_4e3 = _4dd.x;
_4e2 = to.x - pos.x;
}
}
}
if (_4e2 === 0 && !e) {
return;
}
_4df = _4e3 !== 0 ? Math.abs(_4e2 / _4e3) : 0.01;
}
this.slideTo(to, _4df, _4e0);
},adjustDestination: function(to, pos, dim) {
return true;
},abort: function() {
this.scrollTo(this.getPos());
this.stopAnimation();
this._aborted = true;
},stopAnimation: function() {
_4cc.remove(this.containerNode, "mblScrollableScrollTo2");
if (this._scrollBarV) {
this._scrollBarV.className = "";
}
if (this._scrollBarH) {
this._scrollBarH.className = "";
}
if (this._useTransformTransition || this._useTopLeft) {
this.containerNode.style.webkitTransition = "";
if (this._scrollBarV) {
this._scrollBarV.style.webkitTransition = "";
}
if (this._scrollBarH) {
this._scrollBarH.style.webkitTransition = "";
}
}
},scrollIntoView: function(node, _4e4, _4e5) {
if (!this._v) {
return;
}
var c = this.containerNode, h = this.getDim().d.h, top = 0;
for (var n = node; n !== c; n = n.offsetParent) {
if (!n || n.tagName === "BODY") {
return;
}
top += n.offsetTop;
}
var y = _4e4 ? Math.max(h - c.offsetHeight, -top) : Math.min(0, h - top - node.offsetHeight);
(_4e5 && typeof _4e5 === "number") ? this.slideTo({y: y}, _4e5, "ease-out") : this.scrollTo({y: y});
},getSpeed: function() {
var x = 0, y = 0, n = this._time.length;
if (n >= 2 && (new Date()).getTime() - this.startTime - this._time[n - 1] < 500) {
var dy = this._posY[n - (n > 3 ? 2 : 1)] - this._posY[(n - 6) >= 0 ? n - 6 : 0];
var dx = this._posX[n - (n > 3 ? 2 : 1)] - this._posX[(n - 6) >= 0 ? n - 6 : 0];
var dt = this._time[n - (n > 3 ? 2 : 1)] - this._time[(n - 6) >= 0 ? n - 6 : 0];
y = this.calcSpeed(dy, dt);
x = this.calcSpeed(dx, dt);
}
return {x: x,y: y};
},calcSpeed: function(_4e6, time) {
return Math.round(_4e6 / time * 100) * 4;
},scrollTo: function(to, _4e7, node) {
var s = (node || this.containerNode).style;
if (has("webkit")) {
if (!this._useTopLeft) {
if (this._useTransformTransition) {
s.webkitTransition = "";
}
s.webkitTransform = this.makeTranslateStr(to);
} else {
s.webkitTransition = "";
if (this._v) {
s.top = to.y + "px";
}
if (this._h || this._f) {
s.left = to.x + "px";
}
}
} else {
if (this._v) {
s.top = to.y + "px";
}
if (this._h || this._f) {
s.left = to.x + "px";
}
}
if (!_4e7) {
this.scrollScrollBarTo(this.calcScrollBarPos(to));
}
},slideTo: function(to, _4e8, _4e9) {
this._runSlideAnimation(this.getPos(), to, _4e8, _4e9, this.containerNode, 2);
this.slideScrollBarTo(to, _4e8, _4e9);
},makeTranslateStr: function(to) {
var y = this._v && typeof to.y == "number" ? to.y + "px" : "0px";
var x = (this._h || this._f) && typeof to.x == "number" ? to.x + "px" : "0px";
return has("translate3d") ? "translate3d(" + x + "," + y + ",0px)" : "translate(" + x + "," + y + ")";
},getPos: function() {
if (has("webkit")) {
var s = win.doc.defaultView.getComputedStyle(this.containerNode, "");
if (!this._useTopLeft) {
var m = s["-webkit-transform"];
if (m && m.indexOf("matrix") === 0) {
var arr = m.split(/[,\s\)]+/);
return {y: arr[5] - 0,x: arr[4] - 0};
}
return {x: 0,y: 0};
} else {
return {x: parseInt(s.left) || 0,y: parseInt(s.top) || 0};
}
} else {
var y = parseInt(this.containerNode.style.top) || 0;
return {y: y,x: this.containerNode.offsetLeft};
}
},getDim: function() {
var d = {};
d.c = {h: this.containerNode.offsetHeight,w: this.containerNode.offsetWidth};
d.v = {h: this.domNode.offsetHeight + this._appFooterHeight,w: this.domNode.offsetWidth};
d.d = {h: d.v.h - this.fixedHeaderHeight - this.fixedFooterHeight,w: d.v.w};
d.o = {h: d.c.h - d.v.h + this.fixedHeaderHeight + this.fixedFooterHeight,w: d.c.w - d.v.w};
return d;
},showScrollBar: function() {
if (!this.scrollBar) {
return;
}
var dim = this._dim;
if (this.scrollDir == "v" && dim.c.h <= dim.d.h) {
return;
}
if (this.scrollDir == "h" && dim.c.w <= dim.d.w) {
return;
}
if (this._v && this._h && dim.c.h <= dim.d.h && dim.c.w <= dim.d.w) {
return;
}
var _4ea = function(self, dir) {
var bar = self["_scrollBarNode" + dir];
if (!bar) {
var _4eb = _4cd.create("div", null, self.domNode);
var _4ec = {position: "absolute",overflow: "hidden"};
if (dir == "V") {
_4ec.right = "2px";
_4ec.width = "5px";
} else {
_4ec.bottom = (self.isLocalFooter ? self.fixedFooterHeight : 0) + 2 + "px";
_4ec.height = "5px";
}
_4ce.set(_4eb, _4ec);
_4eb.className = "mblScrollBarWrapper";
self["_scrollBarWrapper" + dir] = _4eb;
bar = _4cd.create("div", null, _4eb);
_4ce.set(bar, {opacity: 0.6,position: "absolute",backgroundColor: "#606060",fontSize: "1px",webkitBorderRadius: "2px",MozBorderRadius: "2px",webkitTransformOrigin: "0 0",zIndex: 2147483647});
_4ce.set(bar, dir == "V" ? {width: "5px"} : {height: "5px"});
self["_scrollBarNode" + dir] = bar;
}
return bar;
};
if (this._v && !this._scrollBarV) {
this._scrollBarV = _4ea(this, "V");
}
if (this._h && !this._scrollBarH) {
this._scrollBarH = _4ea(this, "H");
}
this.resetScrollBar();
},hideScrollBar: function() {
if (this.fadeScrollBar && has("webkit")) {
if (!dm._fadeRule) {
var node = _4cd.create("style", null, win.doc.getElementsByTagName("head")[0]);
node.textContent = ".mblScrollableFadeScrollBar{" + "  -webkit-animation-duration: 1s;" + "  -webkit-animation-name: scrollableViewFadeScrollBar;}" + "@-webkit-keyframes scrollableViewFadeScrollBar{" + "  from { opacity: 0.6; }" + "  to { opacity: 0; }}";
dm._fadeRule = node.sheet.cssRules[1];
}
}
if (!this.scrollBar) {
return;
}
var f = function(bar, self) {
_4ce.set(bar, {opacity: 0,webkitAnimationDuration: ""});
if (!(self._useTopLeft && has("android"))) {
bar.className = "mblScrollableFadeScrollBar";
}
};
if (this._scrollBarV) {
f(this._scrollBarV, this);
this._scrollBarV = null;
}
if (this._scrollBarH) {
f(this._scrollBarH, this);
this._scrollBarH = null;
}
},calcScrollBarPos: function(to) {
var pos = {};
var dim = this._dim;
var f = function(_4ed, barH, t, d, c) {
var y = Math.round((d - barH - 8) / (d - c) * t);
if (y < -barH + 5) {
y = -barH + 5;
}
if (y > _4ed - 5) {
y = _4ed - 5;
}
return y;
};
if (typeof to.y == "number" && this._scrollBarV) {
pos.y = f(this._scrollBarWrapperV.offsetHeight, this._scrollBarV.offsetHeight, to.y, dim.d.h, dim.c.h);
}
if (typeof to.x == "number" && this._scrollBarH) {
pos.x = f(this._scrollBarWrapperH.offsetWidth, this._scrollBarH.offsetWidth, to.x, dim.d.w, dim.c.w);
}
return pos;
},scrollScrollBarTo: function(to) {
if (!this.scrollBar) {
return;
}
if (this._v && this._scrollBarV && typeof to.y == "number") {
if (has("webkit")) {
if (!this._useTopLeft) {
if (this._useTransformTransition) {
this._scrollBarV.style.webkitTransition = "";
}
this._scrollBarV.style.webkitTransform = this.makeTranslateStr({y: to.y});
} else {
_4ce.set(this._scrollBarV, {webkitTransition: "",top: to.y + "px"});
}
} else {
this._scrollBarV.style.top = to.y + "px";
}
}
if (this._h && this._scrollBarH && typeof to.x == "number") {
if (has("webkit")) {
if (!this._useTopLeft) {
if (this._useTransformTransition) {
this._scrollBarH.style.webkitTransition = "";
}
this._scrollBarH.style.webkitTransform = this.makeTranslateStr({x: to.x});
} else {
_4ce.set(this._scrollBarH, {webkitTransition: "",left: to.x + "px"});
}
} else {
this._scrollBarH.style.left = to.x + "px";
}
}
},slideScrollBarTo: function(to, _4ee, _4ef) {
if (!this.scrollBar) {
return;
}
var _4f0 = this.calcScrollBarPos(this.getPos());
var _4f1 = this.calcScrollBarPos(to);
if (this._v && this._scrollBarV) {
this._runSlideAnimation({y: _4f0.y}, {y: _4f1.y}, _4ee, _4ef, this._scrollBarV, 0);
}
if (this._h && this._scrollBarH) {
this._runSlideAnimation({x: _4f0.x}, {x: _4f1.x}, _4ee, _4ef, this._scrollBarH, 1);
}
},_runSlideAnimation: function(from, to, _4f2, _4f3, node, idx) {
if (has("webkit")) {
if (!this._useTopLeft) {
if (this._useTransformTransition) {
if (to.x === undefined) {
to.x = from.x;
}
if (to.y === undefined) {
to.y = from.y;
}
if (to.x !== from.x || to.y !== from.y) {
_4ce.set(node, {webkitTransitionProperty: "-webkit-transform",webkitTransitionDuration: _4f2 + "s",webkitTransitionTimingFunction: _4f3});
var t = this.makeTranslateStr(to);
setTimeout(function() {
_4ce.set(node, {webkitTransform: t});
}, 0);
_4cc.add(node, "mblScrollableScrollTo" + idx);
} else {
this.hideScrollBar();
this.removeCover();
}
} else {
this.setKeyframes(from, to, idx);
_4ce.set(node, {webkitAnimationDuration: _4f2 + "s",webkitAnimationTimingFunction: _4f3});
_4cc.add(node, "mblScrollableScrollTo" + idx);
if (idx == 2) {
this.scrollTo(to, true, node);
} else {
this.scrollScrollBarTo(to);
}
}
} else {
_4ce.set(node, {webkitTransitionProperty: "top, left",webkitTransitionDuration: _4f2 + "s",webkitTransitionTimingFunction: _4f3});
setTimeout(function() {
_4ce.set(node, {top: (to.y || 0) + "px",left: (to.x || 0) + "px"});
}, 0);
_4cc.add(node, "mblScrollableScrollTo" + idx);
}
} else {
if (dojo.fx && dojo.fx.easing && _4f2) {
var s = dojo.fx.slideTo({node: node,duration: _4f2 * 1000,left: to.x,top: to.y,easing: (_4f3 == "ease-out") ? dojo.fx.easing.quadOut : dojo.fx.easing.linear}).play();
if (idx == 2) {
_4ca.connect(s, "onEnd", this, "onFlickAnimationEnd");
}
} else {
if (idx == 2) {
this.scrollTo(to, false, node);
this.onFlickAnimationEnd();
} else {
this.scrollScrollBarTo(to);
}
}
}
},resetScrollBar: function() {
var f = function(_4f4, bar, d, c, hd, v) {
if (!bar) {
return;
}
var _4f5 = {};
_4f5[v ? "top" : "left"] = hd + 4 + "px";
var t = (d - 8) <= 0 ? 1 : d - 8;
_4f5[v ? "height" : "width"] = t + "px";
_4ce.set(_4f4, _4f5);
var l = Math.round(d * d / c);
l = Math.min(Math.max(l - 8, 5), t);
bar.style[v ? "height" : "width"] = l + "px";
_4ce.set(bar, {"opacity": 0.6});
};
var dim = this.getDim();
f(this._scrollBarWrapperV, this._scrollBarV, dim.d.h, dim.c.h, this.fixedHeaderHeight, true);
f(this._scrollBarWrapperH, this._scrollBarH, dim.d.w, dim.c.w, 0);
this.createMask();
},createMask: function() {
if (!has("webkit")) {
return;
}
var ctx;
if (this._scrollBarWrapperV) {
var h = this._scrollBarWrapperV.offsetHeight;
ctx = win.doc.getCSSCanvasContext("2d", "scrollBarMaskV", 5, h);
ctx.fillStyle = "rgba(0,0,0,0.5)";
ctx.fillRect(1, 0, 3, 2);
ctx.fillRect(0, 1, 5, 1);
ctx.fillRect(0, h - 2, 5, 1);
ctx.fillRect(1, h - 1, 3, 2);
ctx.fillStyle = "rgb(0,0,0)";
ctx.fillRect(0, 2, 5, h - 4);
this._scrollBarWrapperV.style.webkitMaskImage = "-webkit-canvas(scrollBarMaskV)";
}
if (this._scrollBarWrapperH) {
var w = this._scrollBarWrapperH.offsetWidth;
ctx = win.doc.getCSSCanvasContext("2d", "scrollBarMaskH", w, 5);
ctx.fillStyle = "rgba(0,0,0,0.5)";
ctx.fillRect(0, 1, 2, 3);
ctx.fillRect(1, 0, 1, 5);
ctx.fillRect(w - 2, 0, 1, 5);
ctx.fillRect(w - 1, 1, 2, 3);
ctx.fillStyle = "rgb(0,0,0)";
ctx.fillRect(2, 0, w - 4, 5);
this._scrollBarWrapperH.style.webkitMaskImage = "-webkit-canvas(scrollBarMaskH)";
}
},flashScrollBar: function() {
if (this.disableFlashScrollBar || !this.domNode) {
return;
}
this._dim = this.getDim();
if (this._dim.d.h <= 0) {
return;
}
this.showScrollBar();
var _4f6 = this;
setTimeout(function() {
_4f6.hideScrollBar();
}, 300);
},addCover: function() {
if (!has("touch") && !this.noCover) {
if (!dm._cover) {
dm._cover = _4cd.create("div", null, win.doc.body);
dm._cover.className = "mblScrollableCover";
_4ce.set(dm._cover, {backgroundColor: "#ffff00",opacity: 0,position: "absolute",top: "0px",left: "0px",width: "100%",height: "100%",zIndex: 2147483647});
this._ch.push(_4ca.connect(dm._cover, has("touch") ? "ontouchstart" : "onmousedown", this, "onTouchEnd"));
} else {
dm._cover.style.display = "";
}
this.setSelectable(dm._cover, false);
this.setSelectable(this.domNode, false);
}
},removeCover: function() {
if (!has("touch") && dm._cover) {
dm._cover.style.display = "none";
this.setSelectable(dm._cover, true);
this.setSelectable(this.domNode, true);
}
},setKeyframes: function(from, to, idx) {
if (!dm._rule) {
dm._rule = [];
}
if (!dm._rule[idx]) {
var node = _4cd.create("style", null, win.doc.getElementsByTagName("head")[0]);
node.textContent = ".mblScrollableScrollTo" + idx + "{-webkit-animation-name: scrollableViewScroll" + idx + ";}" + "@-webkit-keyframes scrollableViewScroll" + idx + "{}";
dm._rule[idx] = node.sheet.cssRules[1];
}
var rule = dm._rule[idx];
if (rule) {
if (from) {
rule.deleteRule("from");
rule.insertRule("from { -webkit-transform: " + this.makeTranslateStr(from) + "; }");
}
if (to) {
if (to.x === undefined) {
to.x = from.x;
}
if (to.y === undefined) {
to.y = from.y;
}
rule.deleteRule("to");
rule.insertRule("to { -webkit-transform: " + this.makeTranslateStr(to) + "; }");
}
}
},setSelectable: function(node, _4f7) {
node.style.KhtmlUserSelect = _4f7 ? "auto" : "none";
node.style.MozUserSelect = _4f7 ? "" : "none";
node.onselectstart = _4f7 ? null : function() {
return false;
};
if (has("ie")) {
node.unselectable = _4f7 ? "" : "on";
var _4f8 = node.getElementsByTagName("*");
for (var i = 0; i < _4f8.length; i++) {
_4f8[i].unselectable = _4f7 ? "" : "on";
}
}
}});
lang.setObject("dojox.mobile.scrollable", _4d0);
return _4d0;
});
},"dojox/mobile/TabBar": function() {
define("dojox/mobile/TabBar", ["dojo/_base/array", "dojo/_base/declare", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-geometry", "dojo/dom-style", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase", "./TabBarButton"], function(_4f9, _4fa, win, _4fb, _4fc, _4fd, _4fe, _4ff, _500, _501, _502) {
return _4fa("dojox.mobile.TabBar", [_501, _500, _4ff], {iconBase: "",iconPos: "",barType: "tabBar",closable: false,center: true,syncWithViews: false,tag: "ul",selectOne: true,baseClass: "mblTabBar",_fixedButtonWidth: 76,_fixedButtonMargin: 17,_largeScreenWidth: 500,buildRendering: function() {
this.domNode = this.srcNodeRef || _4fc.create(this.tag);
this.reset();
this.inherited(arguments);
},postCreate: function() {
if (this.syncWithViews) {
var f = function(view, _503, dir, _504, _505, _506) {
var _507 = _4f9.filter(this.getChildren(), function(w) {
return w.moveTo === "#" + view.id || w.moveTo === view.id;
})[0];
if (_507) {
_507.set("selected", true);
}
};
this.subscribe("/dojox/mobile/afterTransitionIn", f);
this.subscribe("/dojox/mobile/startView", f);
}
},startup: function() {
if (this._started) {
return;
}
this.inherited(arguments);
this.resize();
},reset: function() {
var prev = this._barType;
if (typeof this.barType === "object") {
this._barType = this.barType["*"];
for (var c in this.barType) {
if (_4fb.contains(win.doc.documentElement, c)) {
this._barType = this.barType[c];
break;
}
}
} else {
this._barType = this.barType;
}
var cap = function(s) {
return s.charAt(0).toUpperCase() + s.substring(1);
};
if (prev) {
_4fb.remove(this.domNode, this.baseClass + cap(prev));
}
_4fb.add(this.domNode, this.baseClass + cap(this._barType));
},resize: function(size) {
var i, w;
if (size && size.w) {
_4fd.setMarginBox(this.domNode, size);
w = size.w;
} else {
w = _4fe.get(this.domNode, "position") === "absolute" ? _4fd.getContentBox(this.domNode).w : _4fd.getMarginBox(this.domNode).w;
}
var bw = this._fixedButtonWidth;
var bm = this._fixedButtonMargin;
var arr = _4f9.map(this.getChildren(), function(w) {
return w.domNode;
});
_4fb.toggle(this.domNode, "mblTabBarNoIcons", !_4f9.some(this.getChildren(), function(w) {
return w.iconNode1;
}));
_4fb.toggle(this.domNode, "mblTabBarNoText", !_4f9.some(this.getChildren(), function(w) {
return w.label;
}));
var _508 = 0;
if (this._barType == "tabBar") {
this.containerNode.style.paddingLeft = "";
_508 = Math.floor((w - (bw + bm * 2) * arr.length) / 2);
if (w < this._largeScreenWidth || _508 < 0) {
for (i = 0; i < arr.length; i++) {
arr[i].style.width = Math.round(98 / arr.length) + "%";
arr[i].style.margin = "0";
}
} else {
for (i = 0; i < arr.length; i++) {
arr[i].style.width = bw + "px";
arr[i].style.margin = "0 " + bm + "px";
}
if (arr.length > 0) {
arr[0].style.marginLeft = _508 + bm + "px";
}
this.containerNode.style.padding = "0px";
}
} else {
for (i = 0; i < arr.length; i++) {
arr[i].style.width = arr[i].style.margin = "";
}
var _509 = this.getParent();
if (this.center && (!_509 || !_4fb.contains(_509.domNode, "mblHeading"))) {
_508 = w;
for (i = 0; i < arr.length; i++) {
_508 -= _4fd.getMarginBox(arr[i]).w;
}
_508 = Math.floor(_508 / 2);
}
this.containerNode.style.paddingLeft = _508 ? _508 + "px" : "";
}
},getSelectedTab: function() {
return _4f9.filter(this.getChildren(), function(w) {
return w.selected;
})[0];
},onCloseButtonClick: function(tab) {
return true;
}});
});
},"dojox/mobile/TabBarButton": function() {
define("dojox/mobile/TabBarButton", ["dojo/_base/connect", "dojo/_base/declare", "dojo/_base/event", "dojo/_base/lang", "dojo/dom", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "./iconUtils", "./_ItemBase", "./Badge", "./sniff"], function(_50a, _50b, _50c, lang, dom, _50d, _50e, _50f, _510, _511, _512, has) {
return _50b("dojox.mobile.TabBarButton", _511, {icon1: "",icon2: "",iconPos1: "",iconPos2: "",selected: false,transition: "none",tag: "li",badge: "",baseClass: "mblTabBarButton",closeIcon: "mblDomButtonWhiteCross",_selStartMethod: "touch",_selEndMethod: "touch",destroy: function() {
if (this.badgeObj) {
delete this.badgeObj;
}
this.inherited(arguments);
},inheritParams: function() {
if (this.icon && !this.icon1) {
this.icon1 = this.icon;
}
var _513 = this.getParent();
if (_513) {
if (!this.transition) {
this.transition = _513.transition;
}
if (this.icon1 && _513.iconBase && _513.iconBase.charAt(_513.iconBase.length - 1) === "/") {
this.icon1 = _513.iconBase + this.icon1;
}
if (!this.icon1) {
this.icon1 = _513.iconBase;
}
if (!this.iconPos1) {
this.iconPos1 = _513.iconPos;
}
if (this.icon2 && _513.iconBase && _513.iconBase.charAt(_513.iconBase.length - 1) === "/") {
this.icon2 = _513.iconBase + this.icon2;
}
if (!this.icon2) {
this.icon2 = _513.iconBase || this.icon1;
}
if (!this.iconPos2) {
this.iconPos2 = _513.iconPos || this.iconPos1;
}
if (_513.closable) {
if (!this.icon1) {
this.icon1 = this.closeIcon;
}
if (!this.icon2) {
this.icon2 = this.closeIcon;
}
_50d.add(this.domNode, "mblTabBarButtonClosable");
}
}
},buildRendering: function() {
this.domNode = this.srcNodeRef || _50e.create(this.tag);
if (this.srcNodeRef) {
if (!this.label) {
this.label = lang.trim(this.srcNodeRef.innerHTML);
}
this.srcNodeRef.innerHTML = "";
}
this.labelNode = this.box = _50e.create("div", {className: "mblTabBarButtonLabel"}, this.domNode);
this.inherited(arguments);
},startup: function() {
if (this._started) {
return;
}
this._dragstartHandle = this.connect(this.domNode, "ondragstart", _50c.stop);
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onClick");
var _514 = this.getParent();
if (_514 && _514.closable) {
this._clickCloseHandler = this.connect(this.iconDivNode, "onclick", "_onCloseButtonClick");
this._keydownCloseHandler = this.connect(this.iconDivNode, "onkeydown", "_onCloseButtonClick");
this.iconDivNode.tabIndex = "0";
}
this.inherited(arguments);
if (!this._isOnLine) {
this._isOnLine = true;
this.set({icon: this._pendingIcon !== undefined ? this._pendingIcon : this.icon,icon1: this.icon1,icon2: this.icon2});
delete this._pendingIcon;
}
dom.setSelectable(this.domNode, false);
},onClose: function(e) {
_50a.publish("/dojox/mobile/tabClose", [this]);
return this.getParent().onCloseButtonClick(this);
},_onCloseButtonClick: function(e) {
if (e && e.type === "keydown" && e.keyCode !== 13) {
return;
}
if (this.onCloseButtonClick(e) === false) {
return;
}
if (this.onClose()) {
this.destroy();
}
},onCloseButtonClick: function() {
},_onClick: function(e) {
if (e && e.type === "keydown" && e.keyCode !== 13) {
return;
}
if (this.onClick(e) === false) {
return;
}
this.defaultClickAction(e);
},onClick: function() {
},_setIcon: function(icon, n) {
if (!this.getParent()) {
return;
}
this._set("icon" + n, icon);
if (!this.iconDivNode) {
this.iconDivNode = _50e.create("div", {className: "mblTabBarButtonIconArea"}, this.domNode, "first");
}
if (!this["iconParentNode" + n]) {
this["iconParentNode" + n] = _50e.create("div", {className: "mblTabBarButtonIconParent mblTabBarButtonIconParent" + n}, this.iconDivNode);
}
this["iconNode" + n] = _510.setIcon(icon, this["iconPos" + n], this["iconNode" + n], this.alt, this["iconParentNode" + n]);
this["icon" + n] = icon;
_50d.toggle(this.domNode, "mblTabBarButtonHasIcon", icon && icon !== "none");
},_setIcon1Attr: function(icon) {
this._setIcon(icon, 1);
},_setIcon2Attr: function(icon) {
this._setIcon(icon, 2);
},_getBadgeAttr: function() {
return this.badgeObj && this.badgeObj.domNode.parentNode && this.badgeObj.domNode.parentNode.nodeType == 1 ? this.badgeObj.getValue() : null;
},_setBadgeAttr: function(_515) {
if (!this.badgeObj) {
this.badgeObj = new _512({fontSize: 11});
_50f.set(this.badgeObj.domNode, {position: "absolute",top: "0px",right: "0px"});
}
this.badgeObj.setValue(_515);
if (_515) {
this.domNode.appendChild(this.badgeObj.domNode);
} else {
if (this.domNode === this.badgeObj.domNode.parentNode) {
this.domNode.removeChild(this.badgeObj.domNode);
}
}
},_setSelectedAttr: function(_516) {
this.inherited(arguments);
_50d.toggle(this.domNode, "mblTabBarButtonSelected", _516);
}});
});
},"dojox/mobile/TextBox": function() {
define("dojox/mobile/TextBox", ["dojo/_base/declare", "dojo/dom-construct", "dijit/_WidgetBase", "dijit/form/_FormValueMixin", "dijit/form/_TextBoxMixin"], function(_517, _518, _519, _51a, _51b) {
return _517("dojox.mobile.TextBox", [_519, _51a, _51b], {baseClass: "mblTextBox",_setTypeAttr: null,_setPlaceHolderAttr: function(_51c) {
_51c = this._cv ? this._cv(_51c) : _51c;
this._set("placeHolder", _51c);
this.textbox.setAttribute("placeholder", _51c);
},buildRendering: function() {
if (!this.srcNodeRef) {
this.srcNodeRef = _518.create("input", {"type": this.type});
}
this.inherited(arguments);
this.textbox = this.focusNode = this.domNode;
},postCreate: function() {
this.inherited(arguments);
this.connect(this.textbox, "onmouseup", function() {
this._mouseIsDown = false;
});
this.connect(this.textbox, "onmousedown", function() {
this._mouseIsDown = true;
});
this.connect(this.textbox, "onfocus", function(e) {
this._onFocus(this._mouseIsDown ? "mouse" : e);
this._mouseIsDown = false;
});
this.connect(this.textbox, "onblur", "_onBlur");
}});
});
},"dijit/form/_FormValueMixin": function() {
define("dijit/form/_FormValueMixin", ["dojo/_base/declare", "dojo/dom-attr", "dojo/keys", "dojo/sniff", "./_FormWidgetMixin"], function(_51d, _51e, keys, has, _51f) {
return _51d("dijit.form._FormValueMixin", _51f, {readOnly: false,_setReadOnlyAttr: function(_520) {
_51e.set(this.focusNode, "readOnly", _520);
this._set("readOnly", _520);
},postCreate: function() {
this.inherited(arguments);
if (has("ie")) {
this.connect(this.focusNode || this.domNode, "onkeydown", this._onKeyDown);
}
if (this._resetValue === undefined) {
this._lastValueReported = this._resetValue = this.value;
}
},_setValueAttr: function(_521, _522) {
this._handleOnChange(_521, _522);
},_handleOnChange: function(_523, _524) {
this._set("value", _523);
this.inherited(arguments);
},undo: function() {
this._setValueAttr(this._lastValueReported, false);
},reset: function() {
this._hasBeenBlurred = false;
this._setValueAttr(this._resetValue, true);
},_onKeyDown: function(e) {
if (e.keyCode == keys.ESCAPE && !(e.ctrlKey || e.altKey || e.metaKey)) {
if (has("ie") < 9 || (has("ie") && has("quirks"))) {
e.preventDefault();
var node = e.srcElement, te = node.ownerDocument.createEventObject();
te.keyCode = keys.ESCAPE;
te.shiftKey = e.shiftKey;
node.fireEvent("onkeypress", te);
}
}
}});
});
},"dijit/form/_FormWidgetMixin": function() {
define("dijit/form/_FormWidgetMixin", ["dojo/_base/array", "dojo/_base/declare", "dojo/dom-attr", "dojo/dom-style", "dojo/_base/lang", "dojo/mouse", "dojo/sniff", "dojo/window", "../a11y"], function(_525, _526, _527, _528, lang, _529, has, _52a, a11y) {
return _526("dijit.form._FormWidgetMixin", null, {name: "",alt: "",value: "",type: "text","aria-label": "focusNode",tabIndex: "0",_setTabIndexAttr: "focusNode",disabled: false,intermediateChanges: false,scrollOnFocus: true,_setIdAttr: "focusNode",_setDisabledAttr: function(_52b) {
this._set("disabled", _52b);
_527.set(this.focusNode, "disabled", _52b);
if (this.valueNode) {
_527.set(this.valueNode, "disabled", _52b);
}
this.focusNode.setAttribute("aria-disabled", _52b ? "true" : "false");
if (_52b) {
this._set("hovering", false);
this._set("active", false);
var _52c = "tabIndex" in this.attributeMap ? this.attributeMap.tabIndex : ("_setTabIndexAttr" in this) ? this._setTabIndexAttr : "focusNode";
_525.forEach(lang.isArray(_52c) ? _52c : [_52c], function(_52d) {
var node = this[_52d];
if (has("webkit") || a11y.hasDefaultTabStop(node)) {
node.setAttribute("tabIndex", "-1");
} else {
node.removeAttribute("tabIndex");
}
}, this);
} else {
if (this.tabIndex != "") {
this.set("tabIndex", this.tabIndex);
}
}
},_onFocus: function(by) {
if (by == "mouse" && this.isFocusable()) {
var _52e = this.connect(this.focusNode, "onfocus", function() {
this.disconnect(_52f);
this.disconnect(_52e);
});
var _52f = this.connect(this.ownerDocumentBody, "onmouseup", function() {
this.disconnect(_52f);
this.disconnect(_52e);
if (this.focused) {
this.focus();
}
});
}
if (this.scrollOnFocus) {
this.defer(function() {
_52a.scrollIntoView(this.domNode);
});
}
this.inherited(arguments);
},isFocusable: function() {
return !this.disabled && this.focusNode && (_528.get(this.domNode, "display") != "none");
},focus: function() {
if (!this.disabled && this.focusNode.focus) {
try {
this.focusNode.focus();
} catch (e) {
}
}
},compare: function(val1, val2) {
if (typeof val1 == "number" && typeof val2 == "number") {
return (isNaN(val1) && isNaN(val2)) ? 0 : val1 - val2;
} else {
if (val1 > val2) {
return 1;
} else {
if (val1 < val2) {
return -1;
} else {
return 0;
}
}
}
},onChange: function() {
},_onChangeActive: false,_handleOnChange: function(_530, _531) {
if (this._lastValueReported == undefined && (_531 === null || !this._onChangeActive)) {
this._resetValue = this._lastValueReported = _530;
}
this._pendingOnChange = this._pendingOnChange || (typeof _530 != typeof this._lastValueReported) || (this.compare(_530, this._lastValueReported) != 0);
if ((this.intermediateChanges || _531 || _531 === undefined) && this._pendingOnChange) {
this._lastValueReported = _530;
this._pendingOnChange = false;
if (this._onChangeActive) {
if (this._onChangeHandle) {
this._onChangeHandle.remove();
}
this._onChangeHandle = this.defer(function() {
this._onChangeHandle = null;
this.onChange(_530);
});
}
}
},create: function() {
this.inherited(arguments);
this._onChangeActive = true;
},destroy: function() {
if (this._onChangeHandle) {
this._onChangeHandle.remove();
this.onChange(this._lastValueReported);
}
this.inherited(arguments);
}});
});
},"dojo/window": function() {
define(["./_base/lang", "./sniff", "./_base/window", "./dom", "./dom-geometry", "./dom-style"], function(lang, has, _532, dom, geom, _533) {
var _534 = {getBox: function(doc) {
doc = doc || _532.doc;
var _535 = (doc.compatMode == "BackCompat") ? _532.body(doc) : doc.documentElement, _536 = geom.docScroll(doc), w, h;
if (has("touch")) {
var _537 = _534.get(doc);
w = _537.innerWidth || _535.clientWidth;
h = _537.innerHeight || _535.clientHeight;
} else {
w = _535.clientWidth;
h = _535.clientHeight;
}
return {l: _536.x,t: _536.y,w: w,h: h};
},get: function(doc) {
if (has("ie") && _534 !== document.parentWindow) {
doc.parentWindow.execScript("document._parentWindow = window;", "Javascript");
var win = doc._parentWindow;
doc._parentWindow = null;
return win;
}
return doc.parentWindow || doc.defaultView;
},scrollIntoView: function(node, pos) {
try {
node = dom.byId(node);
var doc = node.ownerDocument || _532.doc, body = _532.body(doc), html = doc.documentElement || body.parentNode, isIE = has("ie"), isWK = has("webkit");
if ((!(has("mozilla") || isIE || isWK || has("opera")) || node == body || node == html) && (typeof node.scrollIntoView != "undefined")) {
node.scrollIntoView(false);
return;
}
var _538 = doc.compatMode == "BackCompat", _539 = (isIE >= 9 && "frameElement" in node.ownerDocument.parentWindow) ? ((html.clientHeight > 0 && html.clientWidth > 0 && (body.clientHeight == 0 || body.clientWidth == 0 || body.clientHeight > html.clientHeight || body.clientWidth > html.clientWidth)) ? html : body) : (_538 ? body : html), _53a = isWK ? body : _539, _53b = _539.clientWidth, _53c = _539.clientHeight, rtl = !geom.isBodyLtr(doc), _53d = pos || geom.position(node), el = node.parentNode, _53e = function(el) {
return ((isIE <= 6 || (isIE && _538)) ? false : (_533.get(el, "position").toLowerCase() == "fixed"));
};
if (_53e(node)) {
return;
}
while (el) {
if (el == body) {
el = _53a;
}
var _53f = geom.position(el), _540 = _53e(el);
if (el == _53a) {
_53f.w = _53b;
_53f.h = _53c;
if (_53a == html && isIE && rtl) {
_53f.x += _53a.offsetWidth - _53f.w;
}
if (_53f.x < 0 || !isIE) {
_53f.x = 0;
}
if (_53f.y < 0 || !isIE) {
_53f.y = 0;
}
} else {
var pb = geom.getPadBorderExtents(el);
_53f.w -= pb.w;
_53f.h -= pb.h;
_53f.x += pb.l;
_53f.y += pb.t;
var _541 = el.clientWidth, _542 = _53f.w - _541;
if (_541 > 0 && _542 > 0) {
_53f.w = _541;
_53f.x += (rtl && (isIE || el.clientLeft > pb.l)) ? _542 : 0;
}
_541 = el.clientHeight;
_542 = _53f.h - _541;
if (_541 > 0 && _542 > 0) {
_53f.h = _541;
}
}
if (_540) {
if (_53f.y < 0) {
_53f.h += _53f.y;
_53f.y = 0;
}
if (_53f.x < 0) {
_53f.w += _53f.x;
_53f.x = 0;
}
if (_53f.y + _53f.h > _53c) {
_53f.h = _53c - _53f.y;
}
if (_53f.x + _53f.w > _53b) {
_53f.w = _53b - _53f.x;
}
}
var l = _53d.x - _53f.x, t = _53d.y - Math.max(_53f.y, 0), r = l + _53d.w - _53f.w, bot = t + _53d.h - _53f.h;
if (r * l > 0) {
var s = Math[l < 0 ? "max" : "min"](l, r);
if (rtl && ((isIE == 8 && !_538) || isIE >= 9)) {
s = -s;
}
_53d.x += el.scrollLeft;
el.scrollLeft += s;
_53d.x -= el.scrollLeft;
}
if (bot * t > 0) {
_53d.y += el.scrollTop;
el.scrollTop += Math[t < 0 ? "max" : "min"](t, bot);
_53d.y -= el.scrollTop;
}
el = (el != _53a) && !_540 && el.parentNode;
}
} catch (error) {
console.error("scrollIntoView: " + error);
node.scrollIntoView(false);
}
}};
1 && lang.setObject("dojo.window", _534);
return _534;
});
},"dijit/a11y": function() {
define("dijit/a11y", ["dojo/_base/array", "dojo/_base/config", "dojo/_base/declare", "dojo/dom", "dojo/dom-attr", "dojo/dom-style", "dojo/sniff", "./main"], function(_543, _544, _545, dom, _546, _547, has, _548) {
var _549 = (_548._isElementShown = function(elem) {
var s = _547.get(elem);
return (s.visibility != "hidden") && (s.visibility != "collapsed") && (s.display != "none") && (_546.get(elem, "type") != "hidden");
});
_548.hasDefaultTabStop = function(elem) {
switch (elem.nodeName.toLowerCase()) {
case "a":
return _546.has(elem, "href");
case "area":
case "button":
case "input":
case "object":
case "select":
case "textarea":
return true;
case "iframe":
var body;
try {
var _54a = elem.contentDocument;
if ("designMode" in _54a && _54a.designMode == "on") {
return true;
}
body = _54a.body;
} catch (e1) {
try {
body = elem.contentWindow.document.body;
} catch (e2) {
return false;
}
}
return body && (body.contentEditable == "true" || (body.firstChild && body.firstChild.contentEditable == "true"));
default:
return elem.contentEditable == "true";
}
};
var _54b = (_548.isTabNavigable = function(elem) {
if (_546.get(elem, "disabled")) {
return false;
} else {
if (_546.has(elem, "tabIndex")) {
return _546.get(elem, "tabIndex") >= 0;
} else {
return _548.hasDefaultTabStop(elem);
}
}
});
_548._getTabNavigable = function(root) {
var _54c, last, _54d, _54e, _54f, _550, _551 = {};
function _552(node) {
return node && node.tagName.toLowerCase() == "input" && node.type && node.type.toLowerCase() == "radio" && node.name && node.name.toLowerCase();
}
;
var _553 = function(_554) {
for (var _555 = _554.firstChild; _555; _555 = _555.nextSibling) {
if (_555.nodeType != 1 || (has("ie") <= 9 && _555.scopeName !== "HTML") || !_549(_555)) {
continue;
}
if (_54b(_555)) {
var _556 = +_546.get(_555, "tabIndex");
if (!_546.has(_555, "tabIndex") || _556 == 0) {
if (!_54c) {
_54c = _555;
}
last = _555;
} else {
if (_556 > 0) {
if (!_54d || _556 < _54e) {
_54e = _556;
_54d = _555;
}
if (!_54f || _556 >= _550) {
_550 = _556;
_54f = _555;
}
}
}
var rn = _552(_555);
if (_546.get(_555, "checked") && rn) {
_551[rn] = _555;
}
}
if (_555.nodeName.toUpperCase() != "SELECT") {
_553(_555);
}
}
};
if (_549(root)) {
_553(root);
}
function rs(node) {
return _551[_552(node)] || node;
}
;
return {first: rs(_54c),last: rs(last),lowest: rs(_54d),highest: rs(_54f)};
};
_548.getFirstInTabbingOrder = function(root, doc) {
var _557 = _548._getTabNavigable(dom.byId(root, doc));
return _557.lowest ? _557.lowest : _557.first;
};
_548.getLastInTabbingOrder = function(root, doc) {
var _558 = _548._getTabNavigable(dom.byId(root, doc));
return _558.last ? _558.last : _558.highest;
};
return {hasDefaultTabStop: _548.hasDefaultTabStop,isTabNavigable: _548.isTabNavigable,_getTabNavigable: _548._getTabNavigable,getFirstInTabbingOrder: _548.getFirstInTabbingOrder,getLastInTabbingOrder: _548.getLastInTabbingOrder};
});
},"dijit/form/_TextBoxMixin": function() {
define("dijit/form/_TextBoxMixin", ["dojo/_base/array", "dojo/_base/declare", "dojo/dom", "dojo/_base/event", "dojo/keys", "dojo/_base/lang", "dojo/on", "../main"], function(_559, _55a, dom, _55b, keys, lang, on, _55c) {
var _55d = _55a("dijit.form._TextBoxMixin", null, {trim: false,uppercase: false,lowercase: false,propercase: false,maxLength: "",selectOnClick: false,placeHolder: "",_getValueAttr: function() {
return this.parse(this.get("displayedValue"), this.constraints);
},_setValueAttr: function(_55e, _55f, _560) {
var _561;
if (_55e !== undefined) {
_561 = this.filter(_55e);
if (typeof _560 != "string") {
if (_561 !== null && ((typeof _561 != "number") || !isNaN(_561))) {
_560 = this.filter(this.format(_561, this.constraints));
} else {
_560 = "";
}
}
}
if (_560 != null && ((typeof _560) != "number" || !isNaN(_560)) && this.textbox.value != _560) {
this.textbox.value = _560;
this._set("displayedValue", this.get("displayedValue"));
}
if (this.textDir == "auto") {
this.applyTextDir(this.focusNode, _560);
}
this.inherited(arguments, [_561, _55f]);
},displayedValue: "",_getDisplayedValueAttr: function() {
return this.filter(this.textbox.value);
},_setDisplayedValueAttr: function(_562) {
if (_562 == null) {
_562 = "";
} else {
if (typeof _562 != "string") {
_562 = String(_562);
}
}
this.textbox.value = _562;
this._setValueAttr(this.get("value"), undefined);
this._set("displayedValue", this.get("displayedValue"));
if (this.textDir == "auto") {
this.applyTextDir(this.focusNode, _562);
}
},format: function(_563) {
return _563 == null ? "" : (_563.toString ? _563.toString() : _563);
},parse: function(_564) {
return _564;
},_refreshState: function() {
},onInput: function() {
},__skipInputEvent: false,_onInput: function(evt) {
if (this.textDir == "auto") {
this.applyTextDir(this.focusNode, this.focusNode.value);
}
this._processInput(evt);
},_processInput: function(evt) {
this._refreshState();
this._set("displayedValue", this.get("displayedValue"));
},postCreate: function() {
this.textbox.setAttribute("value", this.textbox.value);
this.inherited(arguments);
var _565 = function(e) {
var _566;
if (e.type == "keydown") {
_566 = e.keyCode;
switch (_566) {
case keys.SHIFT:
case keys.ALT:
case keys.CTRL:
case keys.META:
case keys.CAPS_LOCK:
case keys.NUM_LOCK:
case keys.SCROLL_LOCK:
return;
}
if (!e.ctrlKey && !e.metaKey && !e.altKey) {
switch (_566) {
case keys.NUMPAD_0:
case keys.NUMPAD_1:
case keys.NUMPAD_2:
case keys.NUMPAD_3:
case keys.NUMPAD_4:
case keys.NUMPAD_5:
case keys.NUMPAD_6:
case keys.NUMPAD_7:
case keys.NUMPAD_8:
case keys.NUMPAD_9:
case keys.NUMPAD_MULTIPLY:
case keys.NUMPAD_PLUS:
case keys.NUMPAD_ENTER:
case keys.NUMPAD_MINUS:
case keys.NUMPAD_PERIOD:
case keys.NUMPAD_DIVIDE:
return;
}
if ((_566 >= 65 && _566 <= 90) || (_566 >= 48 && _566 <= 57) || _566 == keys.SPACE) {
return;
}
var _567 = false;
for (var i in keys) {
if (keys[i] === e.keyCode) {
_567 = true;
break;
}
}
if (!_567) {
return;
}
}
}
_566 = e.charCode >= 32 ? String.fromCharCode(e.charCode) : e.charCode;
if (!_566) {
_566 = (e.keyCode >= 65 && e.keyCode <= 90) || (e.keyCode >= 48 && e.keyCode <= 57) || e.keyCode == keys.SPACE ? String.fromCharCode(e.keyCode) : e.keyCode;
}
if (!_566) {
_566 = 229;
}
if (e.type == "keypress") {
if (typeof _566 != "string") {
return;
}
if ((_566 >= "a" && _566 <= "z") || (_566 >= "A" && _566 <= "Z") || (_566 >= "0" && _566 <= "9") || (_566 === " ")) {
if (e.ctrlKey || e.metaKey || e.altKey) {
return;
}
}
}
if (e.type == "input") {
if (this.__skipInputEvent) {
this.__skipInputEvent = false;
return;
}
} else {
this.__skipInputEvent = true;
}
var faux = {faux: true}, attr;
for (attr in e) {
if (attr != "layerX" && attr != "layerY") {
var v = e[attr];
if (typeof v != "function" && typeof v != "undefined") {
faux[attr] = v;
}
}
}
lang.mixin(faux, {charOrCode: _566,_wasConsumed: false,preventDefault: function() {
faux._wasConsumed = true;
e.preventDefault();
},stopPropagation: function() {
e.stopPropagation();
}});
if (this.onInput(faux) === false) {
faux.preventDefault();
faux.stopPropagation();
}
if (faux._wasConsumed) {
return;
}
this.defer(function() {
this._onInput(faux);
});
};
this.own(on(this.textbox, "keydown, keypress, paste, cut, input, compositionend", lang.hitch(this, _565)));
},_blankValue: "",filter: function(val) {
if (val === null) {
return this._blankValue;
}
if (typeof val != "string") {
return val;
}
if (this.trim) {
val = lang.trim(val);
}
if (this.uppercase) {
val = val.toUpperCase();
}
if (this.lowercase) {
val = val.toLowerCase();
}
if (this.propercase) {
val = val.replace(/[^\s]+/g, function(word) {
return word.substring(0, 1).toUpperCase() + word.substring(1);
});
}
return val;
},_setBlurValue: function() {
this._setValueAttr(this.get("value"), true);
},_onBlur: function(e) {
if (this.disabled) {
return;
}
this._setBlurValue();
this.inherited(arguments);
},_isTextSelected: function() {
return this.textbox.selectionStart != this.textbox.selectionEnd;
},_onFocus: function(by) {
if (this.disabled || this.readOnly) {
return;
}
if (this.selectOnClick && by == "mouse") {
this._selectOnClickHandle = this.connect(this.domNode, "onmouseup", function() {
this.disconnect(this._selectOnClickHandle);
this._selectOnClickHandle = null;
if (!this._isTextSelected()) {
_55d.selectInputText(this.textbox);
}
});
this.defer(function() {
if (this._selectOnClickHandle) {
this.disconnect(this._selectOnClickHandle);
this._selectOnClickHandle = null;
}
}, 500);
}
this.inherited(arguments);
this._refreshState();
},reset: function() {
this.textbox.value = "";
this.inherited(arguments);
},_setTextDirAttr: function(_568) {
if (!this._created || this.textDir != _568) {
this._set("textDir", _568);
this.applyTextDir(this.focusNode, this.focusNode.value);
}
}});
_55d._setSelectionRange = _55c._setSelectionRange = function(_569, _56a, stop) {
if (_569.setSelectionRange) {
_569.setSelectionRange(_56a, stop);
}
};
_55d.selectInputText = _55c.selectInputText = function(_56b, _56c, stop) {
_56b = dom.byId(_56b);
if (isNaN(_56c)) {
_56c = 0;
}
if (isNaN(stop)) {
stop = _56b.value ? _56b.value.length : 0;
}
try {
_56b.focus();
_55d._setSelectionRange(_56b, _56c, stop);
} catch (e) {
}
};
return _55d;
});
},"dojox/mobile/TextArea": function() {
define("dojox/mobile/TextArea", ["dojo/_base/declare", "dojo/dom-construct", "./TextBox"], function(_56d, _56e, _56f) {
return _56d("dojox.mobile.TextArea", _56f, {baseClass: "mblTextArea",postMixInProperties: function() {
if (!this.value && this.srcNodeRef) {
this.value = this.srcNodeRef.value;
}
this.inherited(arguments);
},buildRendering: function() {
if (!this.srcNodeRef) {
this.srcNodeRef = _56e.create("textarea", {});
}
this.inherited(arguments);
}});
});
},"dojox/mobile/CheckBox": function() {
define("dojox/mobile/CheckBox", ["dojo/_base/declare", "dojo/dom-construct", "dijit/form/_CheckBoxMixin", "./ToggleButton"], function(_570, _571, _572, _573) {
return _570("dojox.mobile.CheckBox", [_573, _572], {baseClass: "mblCheckBox",_setTypeAttr: function() {
},buildRendering: function() {
if (!this.srcNodeRef) {
this.srcNodeRef = _571.create("input", {type: this.type});
}
this.inherited(arguments);
this.focusNode = this.domNode;
},_getValueAttr: function() {
return (this.checked ? this.value : false);
}});
});
},"dijit/form/_CheckBoxMixin": function() {
define("dijit/form/_CheckBoxMixin", ["dojo/_base/declare", "dojo/dom-attr", "dojo/_base/event"], function(_574, _575, _576) {
return _574("dijit.form._CheckBoxMixin", null, {type: "checkbox",value: "on",readOnly: false,_aria_attr: "aria-checked",_setReadOnlyAttr: function(_577) {
this._set("readOnly", _577);
_575.set(this.focusNode, "readOnly", _577);
},_setLabelAttr: undefined,_getSubmitValue: function(_578) {
return !_578 && _578 !== 0 ? "on" : _578;
},_setValueAttr: function(_579) {
_579 = this._getSubmitValue(_579);
this._set("value", _579);
_575.set(this.focusNode, "value", _579);
},reset: function() {
this.inherited(arguments);
this._set("value", this.params.value || "on");
_575.set(this.focusNode, "value", this.value);
},_onClick: function(e) {
if (this.readOnly) {
_576.stop(e);
return false;
}
return this.inherited(arguments);
}});
});
},"dojox/mobile/ToggleButton": function() {
define("dojox/mobile/ToggleButton", ["dojo/_base/declare", "dojo/dom-class", "dijit/form/_ToggleButtonMixin", "./Button"], function(_57a, _57b, _57c, _57d) {
return _57a("dojox.mobile.ToggleButton", [_57d, _57c], {baseClass: "mblToggleButton",_setCheckedAttr: function() {
this.inherited(arguments);
var _57e = (this.baseClass + " " + this["class"]).replace(/(\S+)\s*/g, "$1Checked ").split(" ");
_57b[this.checked ? "add" : "remove"](this.focusNode || this.domNode, _57e);
}});
});
},"dijit/form/_ToggleButtonMixin": function() {
define("dijit/form/_ToggleButtonMixin", ["dojo/_base/declare", "dojo/dom-attr"], function(_57f, _580) {
return _57f("dijit.form._ToggleButtonMixin", null, {checked: false,_aria_attr: "aria-pressed",_onClick: function(evt) {
var _581 = this.checked;
this._set("checked", !_581);
var ret = this.inherited(arguments);
this.set("checked", ret ? this.checked : _581);
return ret;
},_setCheckedAttr: function(_582, _583) {
this._set("checked", _582);
var node = this.focusNode || this.domNode;
_580.set(node, "checked", !!_582);
if (_582) {
node.setAttribute("checked", "");
} else {
node.removeAttribute("checked");
}
node.setAttribute(this._aria_attr, String(_582));
this._handleOnChange(_582, _583);
},reset: function() {
this._hasBeenBlurred = false;
this.set("checked", this.params.checked || false);
}});
});
},"dojox/mobile/Button": function() {
define("dojox/mobile/Button", ["dojo/_base/array", "dojo/_base/declare", "dojo/dom-class", "dojo/dom-construct", "dijit/_WidgetBase", "dijit/form/_ButtonMixin", "dijit/form/_FormWidgetMixin"], function(_584, _585, _586, _587, _588, _589, _58a) {
return _585("dojox.mobile.Button", [_588, _58a, _589], {baseClass: "mblButton",_setTypeAttr: null,duration: 1000,_onClick: function(e) {
var ret = this.inherited(arguments);
if (ret && this.duration >= 0) {
var _58b = this.focusNode || this.domNode;
var _58c = (this.baseClass + " " + this["class"]).split(" ");
_58c = _584.map(_58c, function(c) {
return c + "Selected";
});
_586.add(_58b, _58c);
setTimeout(function() {
_586.remove(_58b, _58c);
}, this.duration);
}
return ret;
},isFocusable: function() {
return false;
},buildRendering: function() {
if (!this.srcNodeRef) {
this.srcNodeRef = _587.create("button", {"type": this.type});
} else {
if (this._cv) {
var n = this.srcNodeRef.firstChild;
if (n && n.nodeType === 3) {
n.nodeValue = this._cv(n.nodeValue);
}
}
}
this.inherited(arguments);
this.focusNode = this.domNode;
},postCreate: function() {
this.inherited(arguments);
this.connect(this.domNode, "onclick", "_onClick");
},_setLabelAttr: function(_58d) {
this.inherited(arguments, [this._cv ? this._cv(_58d) : _58d]);
}});
});
},"dijit/form/_ButtonMixin": function() {
define("dijit/form/_ButtonMixin", ["dojo/_base/declare", "dojo/dom", "dojo/_base/event", "../registry"], function(_58e, dom, _58f, _590) {
return _58e("dijit.form._ButtonMixin", null, {label: "",type: "button",_onClick: function(e) {
if (this.disabled) {
_58f.stop(e);
return false;
}
var _591 = this.onClick(e) === false;
if (!_591 && this.type == "submit" && !(this.valueNode || this.focusNode).form) {
for (var node = this.domNode; node.parentNode; node = node.parentNode) {
var _592 = _590.byNode(node);
if (_592 && typeof _592._onSubmit == "function") {
_592._onSubmit(e);
_591 = true;
break;
}
}
}
if (_591) {
e.preventDefault();
}
return !_591;
},postCreate: function() {
this.inherited(arguments);
dom.setSelectable(this.focusNode, false);
},onClick: function() {
return true;
},_setLabelAttr: function(_593) {
this._set("label", _593);
(this.containerNode || this.focusNode).innerHTML = _593;
}});
});
},"dojox/mobile/ExpandingTextArea": function() {
define("dojox/mobile/ExpandingTextArea", ["dojo/_base/declare", "dijit/form/_ExpandingTextAreaMixin", "./TextArea"], function(_594, _595, _596) {
return _594("dojox.mobile.ExpandingTextArea", [_596, _595], {baseClass: "mblTextArea mblExpandingTextArea"});
});
},"dijit/form/_ExpandingTextAreaMixin": function() {
define("dijit/form/_ExpandingTextAreaMixin", ["dojo/_base/declare", "dojo/dom-construct", "dojo/has", "dojo/_base/lang", "dojo/on", "dojo/_base/window", "../Viewport"], function(_597, _598, has, lang, on, win, _599) {
has.add("textarea-needs-help-shrinking", function() {
var body = win.body(), te = _598.create("textarea", {rows: "5",cols: "20",value: " ",style: {zoom: 1,fontSize: "12px",height: "96px",overflow: "hidden",visibility: "hidden",position: "absolute",border: "5px solid white",margin: "0",padding: "0",boxSizing: "border-box",MsBoxSizing: "border-box",WebkitBoxSizing: "border-box",MozBoxSizing: "border-box"}}, body, "last");
var _59a = te.scrollHeight >= te.clientHeight;
body.removeChild(te);
return _59a;
});
return _597("dijit.form._ExpandingTextAreaMixin", null, {_setValueAttr: function() {
this.inherited(arguments);
this.resize();
},postCreate: function() {
this.inherited(arguments);
var _59b = this.textbox;
_59b.style.overflowY = "hidden";
this.own(on(_59b, "focus, resize", lang.hitch(this, "_resizeLater")));
},startup: function() {
this.inherited(arguments);
this.own(_599.on("resize", lang.hitch(this, "_resizeLater")));
this._resizeLater();
},_onInput: function(e) {
this.inherited(arguments);
this.resize();
},_estimateHeight: function() {
var _59c = this.textbox;
_59c.rows = (_59c.value.match(/\n/g) || []).length + 1;
},_resizeLater: function() {
this.defer("resize");
},resize: function() {
var _59d = this.textbox;
function _59e() {
var _59f = false;
if (_59d.value === "") {
_59d.value = " ";
_59f = true;
}
var sh = _59d.scrollHeight;
if (_59f) {
_59d.value = "";
}
return sh;
}
;
if (_59d.style.overflowY == "hidden") {
_59d.scrollTop = 0;
}
if (this.busyResizing) {
return;
}
this.busyResizing = true;
if (_59e() || _59d.offsetHeight) {
var newH = _59e() + Math.max(_59d.offsetHeight - _59d.clientHeight, 0);
var _5a0 = newH + "px";
if (_5a0 != _59d.style.height) {
_59d.style.height = _5a0;
_59d.rows = 1;
}
if (has("textarea-needs-help-shrinking")) {
var _5a1 = _59e(), _5a2 = _5a1, _5a3 = _59d.style.minHeight, _5a4 = 4, _5a5, _5a6 = _59d.scrollTop;
_59d.style.minHeight = _5a0;
_59d.style.height = "auto";
while (newH > 0) {
_59d.style.minHeight = Math.max(newH - _5a4, 4) + "px";
_5a5 = _59e();
var _5a7 = _5a2 - _5a5;
newH -= _5a7;
if (_5a7 < _5a4) {
break;
}
_5a2 = _5a5;
_5a4 <<= 1;
}
_59d.style.height = newH + "px";
_59d.style.minHeight = _5a3;
_59d.scrollTop = _5a6;
}
_59d.style.overflowY = _59e() > _59d.clientHeight ? "auto" : "hidden";
if (_59d.style.overflowY == "hidden") {
_59d.scrollTop = 0;
}
} else {
this._estimateHeight();
}
this.busyResizing = false;
}});
});
},"dijit/Viewport": function() {
define("dijit/Viewport", ["dojo/Evented", "dojo/on", "dojo/ready", "dojo/sniff", "dojo/_base/window", "dojo/window"], function(_5a8, on, _5a9, has, win, _5aa) {
var _5ab = new _5a8();
_5a9(200, function() {
var _5ac = _5aa.getBox();
_5ab._rlh = on(win.global, "resize", function() {
var _5ad = _5aa.getBox();
if (_5ac.h == _5ad.h && _5ac.w == _5ad.w) {
return;
}
_5ac = _5ad;
_5ab.emit("resize");
});
if (has("ie") == 8) {
var _5ae = screen.deviceXDPI;
setInterval(function() {
if (screen.deviceXDPI != _5ae) {
_5ae = screen.deviceXDPI;
_5ab.emit("resize");
}
}, 500);
}
});
return _5ab;
});
},"dojox/mobile/SimpleDialog": function() {
define("dojox/mobile/SimpleDialog", ["dojo/_base/declare", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "./Pane", "./iconUtils"], function(_5af, win, _5b0, _5b1, Pane, _5b2) {
return _5af("dojox.mobile.SimpleDialog", Pane, {top: "auto",left: "auto",modal: true,closeButton: false,closeButtonClass: "mblDomButtonSilverCircleRedCross",tabIndex: "0",_setTabIndexAttr: "",baseClass: "mblSimpleDialog",_cover: [],buildRendering: function() {
this.containerNode = _5b1.create("div", {className: "mblSimpleDialogContainer"});
if (this.srcNodeRef) {
for (var i = 0, len = this.srcNodeRef.childNodes.length; i < len; i++) {
this.containerNode.appendChild(this.srcNodeRef.removeChild(this.srcNodeRef.firstChild));
}
}
this.inherited(arguments);
_5b0.add(this.domNode, "mblSimpleDialogDecoration");
this.domNode.style.display = "none";
this.domNode.appendChild(this.containerNode);
if (this.closeButton) {
this.closeButtonNode = _5b1.create("div", {className: "mblSimpleDialogCloseBtn " + this.closeButtonClass}, this.domNode);
_5b2.createDomButton(this.closeButtonNode);
this._clickHandle = this.connect(this.closeButtonNode, "onclick", "_onCloseButtonClick");
}
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onKeyDown");
},startup: function() {
if (this._started) {
return;
}
this.inherited(arguments);
win.body().appendChild(this.domNode);
},addCover: function() {
if (!this._cover[0]) {
this._cover[0] = _5b1.create("div", {className: "mblSimpleDialogCover"}, win.body());
} else {
this._cover[0].style.display = "";
}
},removeCover: function() {
this._cover[0].style.display = "none";
},_onCloseButtonClick: function(e) {
if (this.onCloseButtonClick(e) === false) {
return;
}
this.hide();
},onCloseButtonClick: function() {
},_onKeyDown: function(e) {
if (e.keyCode == 27) {
this.hide();
}
},refresh: function() {
var n = this.domNode;
if (this.closeButton) {
var b = this.closeButtonNode;
var s = Math.round(b.offsetHeight / 2);
b.style.top = -s + "px";
b.style.left = n.offsetWidth - s + "px";
}
if (this.top === "auto") {
var h = win.global.innerHeight || win.doc.documentElement.clientHeight;
n.style.top = Math.round((h - n.offsetHeight) / 2) + "px";
} else {
n.style.top = this.top;
}
if (this.left === "auto") {
var h = win.global.innerWidth || win.doc.documentElement.clientWidth;
n.style.left = Math.round((h - n.offsetWidth) / 2) + "px";
} else {
n.style.left = this.left;
}
},show: function() {
if (this.domNode.style.display === "") {
return;
}
if (this.modal) {
this.addCover();
}
this.domNode.style.display = "";
this.refresh();
this.domNode.focus();
},hide: function() {
if (this.domNode.style.display === "none") {
return;
}
this.domNode.style.display = "none";
if (this.modal) {
this.removeCover();
}
}});
});
},"dojox/mobile/DatePicker": function() {
define("dojox/mobile/DatePicker", ["dojo/_base/lang", "./_PickerChooser!DatePicker"], function(lang, _5b3) {
return lang.setObject("dojox.mobile.DatePicker", _5b3);
});
},"dojox/mobile/_PickerChooser": function() {
define("dojox/mobile/_PickerChooser", ["dojo/_base/lang", "dojo/_base/window"], function(lang, win) {
return {load: function(id, _5b4, _5b5) {
var dm = win.global._no_dojo_dm || lang.getObject("dojox.mobile", true);
_5b4([(dm.currentTheme === "android" ? "./ValuePicker" : "./SpinWheel") + id], _5b5);
}};
});
},"dojox/mobile/Opener": function() {
define("dojox/mobile/Opener", ["dojo/_base/declare", "dojo/_base/Deferred", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dojo/dom-geometry", "./Tooltip", "./Overlay", "./lazyLoadUtils"], function(_5b6, _5b7, lang, win, _5b8, _5b9, _5ba, _5bb, _5bc, _5bd, _5be) {
var _5bf = _5b8.contains(win.doc.documentElement, "dj_phone");
var cls = _5b6("dojox.mobile.Opener", _5bf ? _5bd : _5bc, {lazy: false,requires: "",buildRendering: function() {
this.inherited(arguments);
this.cover = _5b9.create("div", {onclick: lang.hitch(this, "_onBlur"),"class": "mblOpenerUnderlay",style: {position: _5bf ? "absolute" : "fixed",backgroundColor: "transparent",overflow: "hidden",zIndex: "-1"}}, this.domNode, "first");
},onShow: function(node) {
},onHide: function(node, v) {
},show: function(node, _5c0) {
if (this.lazy) {
this.lazy = false;
var _5c1 = this;
return _5b7.when(_5be.instantiateLazyWidgets(this.domNode, this.requires), function() {
return _5c1.show(node, _5c0);
});
}
this.node = node;
this.onShow(node);
_5ba.set(this.cover, {top: "0px",left: "0px",width: "0px",height: "0px"});
this._resizeCover(_5bb.position(this.domNode, false));
return this.inherited(arguments);
},hide: function(val) {
this.inherited(arguments);
this.onHide(this.node, val);
},_reposition: function() {
var _5c2 = this.inherited(arguments);
this._resizeCover(_5c2);
return _5c2;
},_resizeCover: function(_5c3) {
if (_5bf) {
if (parseInt(_5ba.get(this.cover, "top")) != -_5c3.y || parseInt(_5ba.get(this.cover, "height")) != _5c3.y) {
var x = Math.max(_5c3.x, 0);
_5ba.set(this.cover, {top: -_5c3.y + "px",left: -x + "px",width: _5c3.w + x + "px",height: _5c3.y + "px"});
}
} else {
_5ba.set(this.cover, {width: Math.max(win.doc.documentElement.scrollWidth || win.body().scrollWidth || win.doc.documentElement.clientWidth) + "px",height: Math.max(win.doc.documentElement.scrollHeight || win.body().scrollHeight || win.doc.documentElement.clientHeight) + "px"});
}
},_onBlur: function(e) {
var ret = this.onBlur(e);
if (ret !== false) {
this.hide(e);
}
return ret;
}});
cls.prototype.baseClass += " mblOpener";
return cls;
});
},"dojox/mobile/Tooltip": function() {
define("dojox/mobile/Tooltip", ["dojo/_base/array", "dijit/registry", "dojo/_base/declare", "dojo/_base/lang", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-geometry", "dojo/dom-style", "dijit/place", "dijit/_WidgetBase"], function(_5c4, _5c5, _5c6, lang, _5c7, _5c8, _5c9, _5ca, _5cb, _5cc) {
return _5c6("dojox.mobile.Tooltip", _5cc, {baseClass: "mblTooltip mblTooltipHidden",buildRendering: function() {
this.inherited(arguments);
this.anchor = _5c8.create("div", {"class": "mblTooltipAnchor"}, this.domNode, "first");
this.arrow = _5c8.create("div", {"class": "mblTooltipArrow"}, this.anchor);
this.innerArrow = _5c8.create("div", {"class": "mblTooltipInnerArrow"}, this.anchor);
},show: function(_5cd, _5ce) {
var _5cf = this.domNode;
var _5d0 = {"MRM": "mblTooltipAfter","MLM": "mblTooltipBefore","BMT": "mblTooltipBelow","TMB": "mblTooltipAbove","BLT": "mblTooltipBelow","TLB": "mblTooltipAbove","BRT": "mblTooltipBelow","TRB": "mblTooltipAbove","TLT": "mblTooltipBefore","TRT": "mblTooltipAfter","BRB": "mblTooltipAfter","BLB": "mblTooltipBefore"};
_5c7.remove(_5cf, ["mblTooltipAfter", "mblTooltipBefore", "mblTooltipBelow", "mblTooltipAbove"]);
_5c4.forEach(_5c5.findWidgets(_5cf), function(_5d1) {
if (_5d1.height == "auto" && typeof _5d1.resize == "function") {
if (!_5d1.fixedFooterHeight) {
_5d1.fixedFooterHeight = _5c9.getPadBorderExtents(_5cf).b;
}
_5d1.resize();
}
});
if (_5ce) {
_5ce = _5c4.map(_5ce, function(pos) {
return {after: "after-centered",before: "before-centered"}[pos] || pos;
});
}
var best = _5cb.around(_5cf, _5cd, _5ce || ["below-centered", "above-centered", "after-centered", "before-centered"], this.isLeftToRight());
var _5d2 = _5d0[best.corner + best.aroundCorner.charAt(0)] || "";
_5c7.add(_5cf, _5d2);
var pos = _5c9.position(_5cd, true);
_5ca.set(this.anchor, (_5d2 == "mblTooltipAbove" || _5d2 == "mblTooltipBelow") ? {top: "",left: Math.max(0, pos.x - best.x + (pos.w >> 1) - (this.arrow.offsetWidth >> 1)) + "px"} : {left: "",top: Math.max(0, pos.y - best.y + (pos.h >> 1) - (this.arrow.offsetHeight >> 1)) + "px"});
_5c7.replace(_5cf, "mblTooltipVisible", "mblTooltipHidden");
this.resize = lang.hitch(this, "show", _5cd, _5ce);
return best;
},hide: function() {
this.resize = undefined;
_5c7.replace(this.domNode, "mblTooltipHidden", "mblTooltipVisible");
},onBlur: function(e) {
return true;
},destroy: function() {
if (this.anchor) {
this.anchor.removeChild(this.innerArrow);
this.anchor.removeChild(this.arrow);
this.domNode.removeChild(this.anchor);
this.anchor = this.arrow = this.innerArrow = undefined;
}
this.inherited(arguments);
}});
});
},"dijit/place": function() {
define("dijit/place", ["dojo/_base/array", "dojo/dom-geometry", "dojo/dom-style", "dojo/_base/kernel", "dojo/_base/window", "dojo/window", "./main"], function(_5d3, _5d4, _5d5, _5d6, win, _5d7, _5d8) {
function _5d9(node, _5da, _5db, _5dc) {
var view = _5d7.getBox(node.ownerDocument);
if (!node.parentNode || String(node.parentNode.tagName).toLowerCase() != "body") {
win.body(node.ownerDocument).appendChild(node);
}
var best = null;
_5d3.some(_5da, function(_5dd) {
var _5de = _5dd.corner;
var pos = _5dd.pos;
var _5df = 0;
var _5e0 = {w: {"L": view.l + view.w - pos.x,"R": pos.x - view.l,"M": view.w}[_5de.charAt(1)],h: {"T": view.t + view.h - pos.y,"B": pos.y - view.t,"M": view.h}[_5de.charAt(0)]};
var s = node.style;
s.left = s.right = "auto";
if (_5db) {
var res = _5db(node, _5dd.aroundCorner, _5de, _5e0, _5dc);
_5df = typeof res == "undefined" ? 0 : res;
}
var _5e1 = node.style;
var _5e2 = _5e1.display;
var _5e3 = _5e1.visibility;
if (_5e1.display == "none") {
_5e1.visibility = "hidden";
_5e1.display = "";
}
var bb = _5d4.position(node);
_5e1.display = _5e2;
_5e1.visibility = _5e3;
var _5e4 = {"L": pos.x,"R": pos.x - bb.w,"M": Math.max(view.l, Math.min(view.l + view.w, pos.x + (bb.w >> 1)) - bb.w)}[_5de.charAt(1)], _5e5 = {"T": pos.y,"B": pos.y - bb.h,"M": Math.max(view.t, Math.min(view.t + view.h, pos.y + (bb.h >> 1)) - bb.h)}[_5de.charAt(0)], _5e6 = Math.max(view.l, _5e4), _5e7 = Math.max(view.t, _5e5), endX = Math.min(view.l + view.w, _5e4 + bb.w), endY = Math.min(view.t + view.h, _5e5 + bb.h), _5e8 = endX - _5e6, _5e9 = endY - _5e7;
_5df += (bb.w - _5e8) + (bb.h - _5e9);
if (best == null || _5df < best.overflow) {
best = {corner: _5de,aroundCorner: _5dd.aroundCorner,x: _5e6,y: _5e7,w: _5e8,h: _5e9,overflow: _5df,spaceAvailable: _5e0};
}
return !_5df;
});
if (best.overflow && _5db) {
_5db(node, best.aroundCorner, best.corner, best.spaceAvailable, _5dc);
}
var l = _5d4.isBodyLtr(node.ownerDocument), s = node.style;
s.top = best.y + "px";
s[l ? "left" : "right"] = (l ? best.x : view.w - best.x - best.w) + "px";
s[l ? "right" : "left"] = "auto";
return best;
}
;
var _5ea = {at: function(node, pos, _5eb, _5ec) {
var _5ed = _5d3.map(_5eb, function(_5ee) {
var c = {corner: _5ee,pos: {x: pos.x,y: pos.y}};
if (_5ec) {
c.pos.x += _5ee.charAt(1) == "L" ? _5ec.x : -_5ec.x;
c.pos.y += _5ee.charAt(0) == "T" ? _5ec.y : -_5ec.y;
}
return c;
});
return _5d9(node, _5ed);
},around: function(node, _5ef, _5f0, _5f1, _5f2) {
var _5f3 = (typeof _5ef == "string" || "offsetWidth" in _5ef) ? _5d4.position(_5ef, true) : _5ef;
if (_5ef.parentNode) {
var _5f4 = _5d5.getComputedStyle(_5ef).position == "absolute";
var _5f5 = _5ef.parentNode;
while (_5f5 && _5f5.nodeType == 1 && _5f5.nodeName != "BODY") {
var _5f6 = _5d4.position(_5f5, true), pcs = _5d5.getComputedStyle(_5f5);
if (/relative|absolute/.test(pcs.position)) {
_5f4 = false;
}
if (!_5f4 && /hidden|auto|scroll/.test(pcs.overflow)) {
var _5f7 = Math.min(_5f3.y + _5f3.h, _5f6.y + _5f6.h);
var _5f8 = Math.min(_5f3.x + _5f3.w, _5f6.x + _5f6.w);
_5f3.x = Math.max(_5f3.x, _5f6.x);
_5f3.y = Math.max(_5f3.y, _5f6.y);
_5f3.h = _5f7 - _5f3.y;
_5f3.w = _5f8 - _5f3.x;
}
if (pcs.position == "absolute") {
_5f4 = true;
}
_5f5 = _5f5.parentNode;
}
}
var x = _5f3.x, y = _5f3.y, _5f9 = "w" in _5f3 ? _5f3.w : (_5f3.w = _5f3.width), _5fa = "h" in _5f3 ? _5f3.h : (_5d6.deprecated("place.around: dijit/place.__Rectangle: { x:" + x + ", y:" + y + ", height:" + _5f3.height + ", width:" + _5f9 + " } has been deprecated.  Please use { x:" + x + ", y:" + y + ", h:" + _5f3.height + ", w:" + _5f9 + " }", "", "2.0"), _5f3.h = _5f3.height);
var _5fb = [];
function push(_5fc, _5fd) {
_5fb.push({aroundCorner: _5fc,corner: _5fd,pos: {x: {"L": x,"R": x + _5f9,"M": x + (_5f9 >> 1)}[_5fc.charAt(1)],y: {"T": y,"B": y + _5fa,"M": y + (_5fa >> 1)}[_5fc.charAt(0)]}});
}
;
_5d3.forEach(_5f0, function(pos) {
var ltr = _5f1;
switch (pos) {
case "above-centered":
push("TM", "BM");
break;
case "below-centered":
push("BM", "TM");
break;
case "after-centered":
ltr = !ltr;
case "before-centered":
push(ltr ? "ML" : "MR", ltr ? "MR" : "ML");
break;
case "after":
ltr = !ltr;
case "before":
push(ltr ? "TL" : "TR", ltr ? "TR" : "TL");
push(ltr ? "BL" : "BR", ltr ? "BR" : "BL");
break;
case "below-alt":
ltr = !ltr;
case "below":
push(ltr ? "BL" : "BR", ltr ? "TL" : "TR");
push(ltr ? "BR" : "BL", ltr ? "TR" : "TL");
break;
case "above-alt":
ltr = !ltr;
case "above":
push(ltr ? "TL" : "TR", ltr ? "BL" : "BR");
push(ltr ? "TR" : "TL", ltr ? "BR" : "BL");
break;
default:
push(pos.aroundCorner, pos.corner);
}
});
var _5fe = _5d9(node, _5fb, _5f2, {w: _5f9,h: _5fa});
_5fe.aroundNodePos = _5f3;
return _5fe;
}};
return _5d8.place = _5ea;
});
},"dojox/mobile/Overlay": function() {
define("dojox/mobile/Overlay", ["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/dom-class", "dojo/dom-geometry", "dojo/dom-style", "dojo/window", "dijit/_WidgetBase", "dojo/_base/array", "dijit/registry"], function(_5ff, lang, has, win, _600, _601, _602, _603, _604, _605, _606) {
return _5ff("dojox.mobile.Overlay", _604, {baseClass: "mblOverlay mblOverlayHidden",_reposition: function() {
var _607 = _601.position(this.domNode);
var vp = _603.getBox();
if ((_607.y + _607.h) != vp.h || (_602.get(this.domNode, "position") != "absolute" && has("android") < 3)) {
_607.y = vp.t + vp.h - _607.h;
_602.set(this.domNode, {position: "absolute",top: _607.y + "px",bottom: "auto"});
}
return _607;
},show: function(_608) {
_605.forEach(_606.findWidgets(this.domNode), function(w) {
if (w && w.height == "auto" && typeof w.resize == "function") {
w.resize();
}
});
var _609 = this._reposition();
if (_608) {
var _60a = _601.position(_608);
if (_609.y < _60a.y) {
win.global.scrollBy(0, _60a.y + _60a.h - _609.y);
this._reposition();
}
}
var _60b = this.domNode;
_600.replace(_60b, ["mblCoverv", "mblIn"], ["mblOverlayHidden", "mblRevealv", "mblOut", "mblReverse", "mblTransition"]);
setTimeout(lang.hitch(this, function() {
var _60c = this.connect(_60b, "webkitTransitionEnd", function() {
this.disconnect(_60c);
_600.remove(_60b, ["mblCoverv", "mblIn", "mblTransition"]);
this._reposition();
});
_600.add(_60b, "mblTransition");
}), 100);
var _60d = false;
this._moveHandle = this.connect(win.doc.documentElement, has("touch") ? "ontouchmove" : "onmousemove", function() {
_60d = true;
});
this._repositionTimer = setInterval(lang.hitch(this, function() {
if (_60d) {
_60d = false;
return;
}
this._reposition();
}), 50);
return _609;
},hide: function() {
var _60e = this.domNode;
if (this._moveHandle) {
this.disconnect(this._moveHandle);
this._moveHandle = null;
clearInterval(this._repositionTimer);
this._repositionTimer = null;
}
if (has("webkit")) {
_600.replace(_60e, ["mblRevealv", "mblOut", "mblReverse"], ["mblCoverv", "mblIn", "mblOverlayHidden", "mblTransition"]);
setTimeout(lang.hitch(this, function() {
var _60f = this.connect(_60e, "webkitTransitionEnd", function() {
this.disconnect(_60f);
_600.replace(_60e, ["mblOverlayHidden"], ["mblRevealv", "mblOut", "mblReverse", "mblTransition"]);
});
_600.add(_60e, "mblTransition");
}), 100);
} else {
_600.replace(_60e, ["mblOverlayHidden"], ["mblCoverv", "mblIn", "mblRevealv", "mblOut", "mblReverse"]);
}
},onBlur: function(e) {
return false;
}});
});
},"dojox/mobile/SpinWheelDatePicker": function() {
define("dojox/mobile/SpinWheelDatePicker", ["dojo/_base/array", "dojo/_base/declare", "dojo/dom-class", "./_DatePickerMixin", "./SpinWheel", "./SpinWheelSlot"], function(_610, _611, _612, _613, _614, _615) {
return _611("dojox.mobile.SpinWheelDatePicker", [_614, _613], {slotClasses: [_615, _615, _615],slotProps: [{labelFrom: 1970,labelTo: 2038}, {}, {}],buildRendering: function() {
this.initSlots();
this.inherited(arguments);
_612.add(this.domNode, "mblSpinWheelDatePicker");
this._conn = [this.connect(this.slots[0], "onFlickAnimationEnd", "onYearSet"), this.connect(this.slots[1], "onFlickAnimationEnd", "onMonthSet"), this.connect(this.slots[2], "onFlickAnimationEnd", "onDaySet")];
},disableValues: function(_616) {
_610.forEach(this.slots[2].panelNodes, function(_617) {
for (var i = 27; i < 31; i++) {
_612.toggle(_617.childNodes[i], "mblSpinWheelSlotLabelGray", i >= _616);
}
});
}});
});
},"dojox/mobile/_DatePickerMixin": function() {
define("dojox/mobile/_DatePickerMixin", ["dojo/_base/array", "dojo/_base/declare", "dojo/_base/lang", "dojo/date", "dojo/date/locale", "dojo/date/stamp"], function(_618, _619, lang, _61a, _61b, _61c) {
var _61d = {format: function(d) {
return _61b.format(d, {datePattern: this.pattern,selector: "date"});
}};
var _61e = lang.mixin({initLabels: function() {
this.labels = [];
if (this.labelFrom !== this.labelTo) {
var d = new Date(this.labelFrom, 0, 1);
var i, idx;
for (i = this.labelFrom, idx = 0; i <= this.labelTo; i++, idx++) {
d.setFullYear(i);
this.labels.push(this.format(d));
}
}
}}, _61d);
var _61f = lang.mixin({initLabels: function() {
this.labels = [];
var d = new Date(2000, 0, 16);
for (var i = 0; i < 12; i++) {
d.setMonth(i);
this.labels.push(this.format(d));
}
}}, _61d);
var _620 = lang.mixin({initLabels: function() {
this.labels = [];
var d = new Date(2000, 0, 1);
for (var i = 1; i <= 31; i++) {
d.setDate(i);
this.labels.push(this.format(d));
}
}}, _61d);
return _619("dojox.mobile._DatePickerMixin", null, {yearPattern: "yyyy",monthPattern: "MMM",dayPattern: "d",initSlots: function() {
var c = this.slotClasses, p = this.slotProps;
c[0] = _619(c[0], _61e);
c[1] = _619(c[1], _61f);
c[2] = _619(c[2], _620);
p[0].pattern = this.yearPattern;
p[1].pattern = this.monthPattern;
p[2].pattern = this.dayPattern;
this.reorderSlots();
},reorderSlots: function() {
if (this.slotOrder.length) {
return;
}
var a = _61b._parseInfo().bundle["dateFormat-short"].toLowerCase().split(/[^ymd]+/, 3);
this.slotOrder = _618.map(a, function(pat) {
return {y: 0,m: 1,d: 2}[pat.charAt(0)];
});
},reset: function() {
var now = new Date();
var v = _618.map(this.slots, function(w) {
return w.format(now);
});
this.set("colors", v);
this.disableValues(this.onDaySet());
if (this.value) {
this.set("value", this.value);
this.value = null;
} else {
if (this.values) {
this.set("values", this.values);
this.values = null;
} else {
this.set("values", v);
}
}
},onYearSet: function() {
this.disableValues(this.onDaySet());
},onMonthSet: function() {
this.disableValues(this.onDaySet());
},onDaySet: function() {
var v = this.get("values"), pat = this.slots[0].pattern + "/" + this.slots[1].pattern, date = _61b.parse(v[0] + "/" + v[1], {datePattern: pat,selector: "date"}), _621 = _61a.getDaysInMonth(date);
if (_621 < v[2]) {
this.slots[2].set("value", _621);
}
return _621;
},_getDateAttr: function() {
var v = this.get("values"), s = this.slots, pat = s[0].pattern + "/" + s[1].pattern + "/" + s[2].pattern;
return _61b.parse(v[0] + "/" + v[1] + "/" + v[2], {datePattern: pat,selector: "date"});
},_setValuesAttr: function(_622) {
_618.forEach(this.getSlots(), function(w, i) {
var v = _622[i];
if (typeof v == "number") {
var arr = [1970, 1, 1];
arr.splice(i, 1, v - 0);
v = w.format(new Date(arr[0], arr[1] - 1, arr[2]));
}
w.set("value", v);
});
},_setValueAttr: function(_623) {
var date = _61c.fromISOString(_623);
this.set("values", _618.map(this.slots, function(w) {
return w.format(date);
}));
},_getValueAttr: function() {
return _61c.toISOString(this.get("date"), {selector: "date"});
}});
});
},"dojo/date": function() {
define(["./has", "./_base/lang"], function(has, lang) {
var date = {};
date.getDaysInMonth = function(_624) {
var _625 = _624.getMonth();
var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
if (_625 == 1 && date.isLeapYear(_624)) {
return 29;
}
return days[_625];
};
date.isLeapYear = function(_626) {
var year = _626.getFullYear();
return !(year % 400) || (!(year % 4) && !!(year % 100));
};
date.getTimezoneName = function(_627) {
var str = _627.toString();
var tz = "";
var _628;
var pos = str.indexOf("(");
if (pos > -1) {
tz = str.substring(++pos, str.indexOf(")"));
} else {
var pat = /([A-Z\/]+) \d{4}$/;
if ((_628 = str.match(pat))) {
tz = _628[1];
} else {
str = _627.toLocaleString();
pat = / ([A-Z\/]+)$/;
if ((_628 = str.match(pat))) {
tz = _628[1];
}
}
}
return (tz == "AM" || tz == "PM") ? "" : tz;
};
date.compare = function(_629, _62a, _62b) {
_629 = new Date(+_629);
_62a = new Date(+(_62a || new Date()));
if (_62b == "date") {
_629.setHours(0, 0, 0, 0);
_62a.setHours(0, 0, 0, 0);
} else {
if (_62b == "time") {
_629.setFullYear(0, 0, 0);
_62a.setFullYear(0, 0, 0);
}
}
if (_629 > _62a) {
return 1;
}
if (_629 < _62a) {
return -1;
}
return 0;
};
date.add = function(date, _62c, _62d) {
var sum = new Date(+date);
var _62e = false;
var _62f = "Date";
switch (_62c) {
case "day":
break;
case "weekday":
var days, _630;
var mod = _62d % 5;
if (!mod) {
days = (_62d > 0) ? 5 : -5;
_630 = (_62d > 0) ? ((_62d - 5) / 5) : ((_62d + 5) / 5);
} else {
days = mod;
_630 = parseInt(_62d / 5);
}
var strt = date.getDay();
var adj = 0;
if (strt == 6 && _62d > 0) {
adj = 1;
} else {
if (strt == 0 && _62d < 0) {
adj = -1;
}
}
var trgt = strt + days;
if (trgt == 0 || trgt == 6) {
adj = (_62d > 0) ? 2 : -2;
}
_62d = (7 * _630) + days + adj;
break;
case "year":
_62f = "FullYear";
_62e = true;
break;
case "week":
_62d *= 7;
break;
case "quarter":
_62d *= 3;
case "month":
_62e = true;
_62f = "Month";
break;
default:
_62f = "UTC" + _62c.charAt(0).toUpperCase() + _62c.substring(1) + "s";
}
if (_62f) {
sum["set" + _62f](sum["get" + _62f]() + _62d);
}
if (_62e && (sum.getDate() < date.getDate())) {
sum.setDate(0);
}
return sum;
};
date.difference = function(_631, _632, _633) {
_632 = _632 || new Date();
_633 = _633 || "day";
var _634 = _632.getFullYear() - _631.getFullYear();
var _635 = 1;
switch (_633) {
case "quarter":
var m1 = _631.getMonth();
var m2 = _632.getMonth();
var q1 = Math.floor(m1 / 3) + 1;
var q2 = Math.floor(m2 / 3) + 1;
q2 += (_634 * 4);
_635 = q2 - q1;
break;
case "weekday":
var days = Math.round(date.difference(_631, _632, "day"));
var _636 = parseInt(date.difference(_631, _632, "week"));
var mod = days % 7;
if (mod == 0) {
days = _636 * 5;
} else {
var adj = 0;
var aDay = _631.getDay();
var bDay = _632.getDay();
_636 = parseInt(days / 7);
mod = days % 7;
var _637 = new Date(_631);
_637.setDate(_637.getDate() + (_636 * 7));
var _638 = _637.getDay();
if (days > 0) {
switch (true) {
case aDay == 6:
adj = -1;
break;
case aDay == 0:
adj = 0;
break;
case bDay == 6:
adj = -1;
break;
case bDay == 0:
adj = -2;
break;
case (_638 + mod) > 5:
adj = -2;
}
} else {
if (days < 0) {
switch (true) {
case aDay == 6:
adj = 0;
break;
case aDay == 0:
adj = 1;
break;
case bDay == 6:
adj = 2;
break;
case bDay == 0:
adj = 1;
break;
case (_638 + mod) < 0:
adj = 2;
}
}
}
days += adj;
days -= (_636 * 2);
}
_635 = days;
break;
case "year":
_635 = _634;
break;
case "month":
_635 = (_632.getMonth() - _631.getMonth()) + (_634 * 12);
break;
case "week":
_635 = parseInt(date.difference(_631, _632, "day") / 7);
break;
case "day":
_635 /= 24;
case "hour":
_635 /= 60;
case "minute":
_635 /= 60;
case "second":
_635 /= 1000;
case "millisecond":
_635 *= _632.getTime() - _631.getTime();
}
return Math.round(_635);
};
1 && lang.mixin(lang.getObject("dojo.date", true), date);
return date;
});
},"dojo/date/locale": function() {
define(["../_base/lang", "../_base/array", "../date", "../cldr/supplemental", "../i18n", "../regexp", "../string", "../i18n!../cldr/nls/gregorian", "module"], function(lang, _639, date, _63a, i18n, _63b, _63c, _63d, _63e) {
var _63f = {};
lang.setObject(_63e.id.replace(/\//g, "."), _63f);
function _640(_641, _642, _643, _644) {
return _644.replace(/([a-z])\1*/ig, function(_645) {
var s, pad, c = _645.charAt(0), l = _645.length, _646 = ["abbr", "wide", "narrow"];
switch (c) {
case "G":
s = _642[(l < 4) ? "eraAbbr" : "eraNames"][_641.getFullYear() < 0 ? 0 : 1];
break;
case "y":
s = _641.getFullYear();
switch (l) {
case 1:
break;
case 2:
if (!_643.fullYear) {
s = String(s);
s = s.substr(s.length - 2);
break;
}
default:
pad = true;
}
break;
case "Q":
case "q":
s = Math.ceil((_641.getMonth() + 1) / 3);
pad = true;
break;
case "M":
case "L":
var m = _641.getMonth();
if (l < 3) {
s = m + 1;
pad = true;
} else {
var _647 = ["months", c == "L" ? "standAlone" : "format", _646[l - 3]].join("-");
s = _642[_647][m];
}
break;
case "w":
var _648 = 0;
s = _63f._getWeekOfYear(_641, _648);
pad = true;
break;
case "d":
s = _641.getDate();
pad = true;
break;
case "D":
s = _63f._getDayOfYear(_641);
pad = true;
break;
case "e":
case "c":
var d = _641.getDay();
if (l < 2) {
s = (d - _63a.getFirstDayOfWeek(_643.locale) + 8) % 7;
break;
}
case "E":
d = _641.getDay();
if (l < 3) {
s = d + 1;
pad = true;
} else {
var _649 = ["days", c == "c" ? "standAlone" : "format", _646[l - 3]].join("-");
s = _642[_649][d];
}
break;
case "a":
var _64a = _641.getHours() < 12 ? "am" : "pm";
s = _643[_64a] || _642["dayPeriods-format-wide-" + _64a];
break;
case "h":
case "H":
case "K":
case "k":
var h = _641.getHours();
switch (c) {
case "h":
s = (h % 12) || 12;
break;
case "H":
s = h;
break;
case "K":
s = (h % 12);
break;
case "k":
s = h || 24;
break;
}
pad = true;
break;
case "m":
s = _641.getMinutes();
pad = true;
break;
case "s":
s = _641.getSeconds();
pad = true;
break;
case "S":
s = Math.round(_641.getMilliseconds() * Math.pow(10, l - 3));
pad = true;
break;
case "v":
case "z":
s = _63f._getZone(_641, true, _643);
if (s) {
break;
}
l = 4;
case "Z":
var _64b = _63f._getZone(_641, false, _643);
var tz = [(_64b <= 0 ? "+" : "-"), _63c.pad(Math.floor(Math.abs(_64b) / 60), 2), _63c.pad(Math.abs(_64b) % 60, 2)];
if (l == 4) {
tz.splice(0, 0, "GMT");
tz.splice(3, 0, ":");
}
s = tz.join("");
break;
default:
throw new Error("dojo.date.locale.format: invalid pattern char: " + _644);
}
if (pad) {
s = _63c.pad(s, l);
}
return s;
});
}
;
_63f._getZone = function(_64c, _64d, _64e) {
if (_64d) {
return date.getTimezoneName(_64c);
} else {
return _64c.getTimezoneOffset();
}
};
_63f.format = function(_64f, _650) {
_650 = _650 || {};
var _651 = i18n.normalizeLocale(_650.locale), _652 = _650.formatLength || "short", _653 = _63f._getGregorianBundle(_651), str = [], _654 = lang.hitch(this, _640, _64f, _653, _650);
if (_650.selector == "year") {
return _655(_653["dateFormatItem-yyyy"] || "yyyy", _654);
}
var _656;
if (_650.selector != "date") {
_656 = _650.timePattern || _653["timeFormat-" + _652];
if (_656) {
str.push(_655(_656, _654));
}
}
if (_650.selector != "time") {
_656 = _650.datePattern || _653["dateFormat-" + _652];
if (_656) {
str.push(_655(_656, _654));
}
}
return str.length == 1 ? str[0] : _653["dateTimeFormat-" + _652].replace(/\'/g, "").replace(/\{(\d+)\}/g, function(_657, key) {
return str[key];
});
};
_63f.regexp = function(_658) {
return _63f._parseInfo(_658).regexp;
};
_63f._parseInfo = function(_659) {
_659 = _659 || {};
var _65a = i18n.normalizeLocale(_659.locale), _65b = _63f._getGregorianBundle(_65a), _65c = _659.formatLength || "short", _65d = _659.datePattern || _65b["dateFormat-" + _65c], _65e = _659.timePattern || _65b["timeFormat-" + _65c], _65f;
if (_659.selector == "date") {
_65f = _65d;
} else {
if (_659.selector == "time") {
_65f = _65e;
} else {
_65f = _65b["dateTimeFormat-" + _65c].replace(/\{(\d+)\}/g, function(_660, key) {
return [_65e, _65d][key];
});
}
}
var _661 = [], re = _655(_65f, lang.hitch(this, _662, _661, _65b, _659));
return {regexp: re,tokens: _661,bundle: _65b};
};
_63f.parse = function(_663, _664) {
var _665 = /[\u200E\u200F\u202A\u202E]/g, info = _63f._parseInfo(_664), _666 = info.tokens, _667 = info.bundle, re = new RegExp("^" + info.regexp.replace(_665, "") + "$", info.strict ? "" : "i"), _668 = re.exec(_663 && _663.replace(_665, ""));
if (!_668) {
return null;
}
var _669 = ["abbr", "wide", "narrow"], _66a = [1970, 0, 1, 0, 0, 0, 0], amPm = "", _66b = _639.every(_668, function(v, i) {
if (!i) {
return true;
}
var _66c = _666[i - 1], l = _66c.length, c = _66c.charAt(0);
switch (c) {
case "y":
if (l != 2 && _664.strict) {
_66a[0] = v;
} else {
if (v < 100) {
v = Number(v);
var year = "" + new Date().getFullYear(), _66d = year.substring(0, 2) * 100, _66e = Math.min(Number(year.substring(2, 4)) + 20, 99);
_66a[0] = (v < _66e) ? _66d + v : _66d - 100 + v;
} else {
if (_664.strict) {
return false;
}
_66a[0] = v;
}
}
break;
case "M":
case "L":
if (l > 2) {
var _66f = _667["months-" + (c == "L" ? "standAlone" : "format") + "-" + _669[l - 3]].concat();
if (!_664.strict) {
v = v.replace(".", "").toLowerCase();
_66f = _639.map(_66f, function(s) {
return s.replace(".", "").toLowerCase();
});
}
v = _639.indexOf(_66f, v);
if (v == -1) {
return false;
}
} else {
v--;
}
_66a[1] = v;
break;
case "E":
case "e":
case "c":
var days = _667["days-" + (c == "c" ? "standAlone" : "format") + "-" + _669[l - 3]].concat();
if (!_664.strict) {
v = v.toLowerCase();
days = _639.map(days, function(d) {
return d.toLowerCase();
});
}
v = _639.indexOf(days, v);
if (v == -1) {
return false;
}
break;
case "D":
_66a[1] = 0;
case "d":
_66a[2] = v;
break;
case "a":
var am = _664.am || _667["dayPeriods-format-wide-am"], pm = _664.pm || _667["dayPeriods-format-wide-pm"];
if (!_664.strict) {
var _670 = /\./g;
v = v.replace(_670, "").toLowerCase();
am = am.replace(_670, "").toLowerCase();
pm = pm.replace(_670, "").toLowerCase();
}
if (_664.strict && v != am && v != pm) {
return false;
}
amPm = (v == pm) ? "p" : (v == am) ? "a" : "";
break;
case "K":
if (v == 24) {
v = 0;
}
case "h":
case "H":
case "k":
if (v > 23) {
return false;
}
_66a[3] = v;
break;
case "m":
_66a[4] = v;
break;
case "s":
_66a[5] = v;
break;
case "S":
_66a[6] = v;
}
return true;
});
var _671 = +_66a[3];
if (amPm === "p" && _671 < 12) {
_66a[3] = _671 + 12;
} else {
if (amPm === "a" && _671 == 12) {
_66a[3] = 0;
}
}
var _672 = new Date(_66a[0], _66a[1], _66a[2], _66a[3], _66a[4], _66a[5], _66a[6]);
if (_664.strict) {
_672.setFullYear(_66a[0]);
}
var _673 = _666.join(""), _674 = _673.indexOf("d") != -1, _675 = _673.indexOf("M") != -1;
if (!_66b || (_675 && _672.getMonth() > _66a[1]) || (_674 && _672.getDate() > _66a[2])) {
return null;
}
if ((_675 && _672.getMonth() < _66a[1]) || (_674 && _672.getDate() < _66a[2])) {
_672 = date.add(_672, "hour", 1);
}
return _672;
};
function _655(_676, _677, _678, _679) {
var _67a = function(x) {
return x;
};
_677 = _677 || _67a;
_678 = _678 || _67a;
_679 = _679 || _67a;
var _67b = _676.match(/(''|[^'])+/g), _67c = _676.charAt(0) == "'";
_639.forEach(_67b, function(_67d, i) {
if (!_67d) {
_67b[i] = "";
} else {
_67b[i] = (_67c ? _678 : _677)(_67d.replace(/''/g, "'"));
_67c = !_67c;
}
});
return _679(_67b.join(""));
}
;
function _662(_67e, _67f, _680, _681) {
_681 = _63b.escapeString(_681);
if (!_680.strict) {
_681 = _681.replace(" a", " ?a");
}
return _681.replace(/([a-z])\1*/ig, function(_682) {
var s, c = _682.charAt(0), l = _682.length, p2 = "", p3 = "";
if (_680.strict) {
if (l > 1) {
p2 = "0" + "{" + (l - 1) + "}";
}
if (l > 2) {
p3 = "0" + "{" + (l - 2) + "}";
}
} else {
p2 = "0?";
p3 = "0{0,2}";
}
switch (c) {
case "y":
s = "\\d{2,4}";
break;
case "M":
case "L":
s = (l > 2) ? "\\S+?" : "1[0-2]|" + p2 + "[1-9]";
break;
case "D":
s = "[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|" + p2 + "[1-9][0-9]|" + p3 + "[1-9]";
break;
case "d":
s = "3[01]|[12]\\d|" + p2 + "[1-9]";
break;
case "w":
s = "[1-4][0-9]|5[0-3]|" + p2 + "[1-9]";
break;
case "E":
case "e":
case "c":
s = "\\S+";
break;
case "h":
s = "1[0-2]|" + p2 + "[1-9]";
break;
case "k":
s = "1[01]|" + p2 + "\\d";
break;
case "H":
s = "1\\d|2[0-3]|" + p2 + "\\d";
break;
case "K":
s = "1\\d|2[0-4]|" + p2 + "[1-9]";
break;
case "m":
case "s":
s = "[0-5]\\d";
break;
case "S":
s = "\\d{" + l + "}";
break;
case "a":
var am = _680.am || _67f["dayPeriods-format-wide-am"], pm = _680.pm || _67f["dayPeriods-format-wide-pm"];
s = am + "|" + pm;
if (!_680.strict) {
if (am != am.toLowerCase()) {
s += "|" + am.toLowerCase();
}
if (pm != pm.toLowerCase()) {
s += "|" + pm.toLowerCase();
}
if (s.indexOf(".") != -1) {
s += "|" + s.replace(/\./g, "");
}
}
s = s.replace(/\./g, "\\.");
break;
default:
s = ".*";
}
if (_67e) {
_67e.push(_682);
}
return "(" + s + ")";
}).replace(/[\xa0 ]/g, "[\\s\\xa0]");
}
;
var _683 = [];
_63f.addCustomFormats = function(_684, _685) {
_683.push({pkg: _684,name: _685});
};
_63f._getGregorianBundle = function(_686) {
var _687 = {};
_639.forEach(_683, function(desc) {
var _688 = i18n.getLocalization(desc.pkg, desc.name, _686);
_687 = lang.mixin(_687, _688);
}, this);
return _687;
};
_63f.addCustomFormats(_63e.id.replace(/\/date\/locale$/, ".cldr"), "gregorian");
_63f.getNames = function(item, type, _689, _68a) {
var _68b, _68c = _63f._getGregorianBundle(_68a), _68d = [item, _689, type];
if (_689 == "standAlone") {
var key = _68d.join("-");
_68b = _68c[key];
if (_68b[0] == 1) {
_68b = undefined;
}
}
_68d[1] = "format";
return (_68b || _68c[_68d.join("-")]).concat();
};
_63f.isWeekend = function(_68e, _68f) {
var _690 = _63a.getWeekend(_68f), day = (_68e || new Date()).getDay();
if (_690.end < _690.start) {
_690.end += 7;
if (day < _690.start) {
day += 7;
}
}
return day >= _690.start && day <= _690.end;
};
_63f._getDayOfYear = function(_691) {
return date.difference(new Date(_691.getFullYear(), 0, 1, _691.getHours()), _691) + 1;
};
_63f._getWeekOfYear = function(_692, _693) {
if (arguments.length == 1) {
_693 = 0;
}
var _694 = new Date(_692.getFullYear(), 0, 1).getDay(), adj = (_694 - _693 + 7) % 7, week = Math.floor((_63f._getDayOfYear(_692) + adj - 1) / 7);
if (_694 == _693) {
week++;
}
return week;
};
return _63f;
});
},"dojo/cldr/supplemental": function() {
define(["../_base/lang", "../i18n"], function(lang, i18n) {
var _695 = {};
lang.setObject("dojo.cldr.supplemental", _695);
_695.getFirstDayOfWeek = function(_696) {
var _697 = {bd: 5,mv: 5,ae: 6,af: 6,bh: 6,dj: 6,dz: 6,eg: 6,iq: 6,ir: 6,jo: 6,kw: 6,ly: 6,ma: 6,om: 6,qa: 6,sa: 6,sd: 6,sy: 6,ye: 6,ag: 0,ar: 0,as: 0,au: 0,br: 0,bs: 0,bt: 0,bw: 0,by: 0,bz: 0,ca: 0,cn: 0,co: 0,dm: 0,"do": 0,et: 0,gt: 0,gu: 0,hk: 0,hn: 0,id: 0,ie: 0,il: 0,"in": 0,jm: 0,jp: 0,ke: 0,kh: 0,kr: 0,la: 0,mh: 0,mm: 0,mo: 0,mt: 0,mx: 0,mz: 0,ni: 0,np: 0,nz: 0,pa: 0,pe: 0,ph: 0,pk: 0,pr: 0,py: 0,sg: 0,sv: 0,th: 0,tn: 0,tt: 0,tw: 0,um: 0,us: 0,ve: 0,vi: 0,ws: 0,za: 0,zw: 0};
var _698 = _695._region(_696);
var dow = _697[_698];
return (dow === undefined) ? 1 : dow;
};
_695._region = function(_699) {
_699 = i18n.normalizeLocale(_699);
var tags = _699.split("-");
var _69a = tags[1];
if (!_69a) {
_69a = {de: "de",en: "us",es: "es",fi: "fi",fr: "fr",he: "il",hu: "hu",it: "it",ja: "jp",ko: "kr",nl: "nl",pt: "br",sv: "se",zh: "cn"}[tags[0]];
} else {
if (_69a.length == 4) {
_69a = tags[2];
}
}
return _69a;
};
_695.getWeekend = function(_69b) {
var _69c = {"in": 0,af: 4,dz: 4,ir: 4,om: 4,sa: 4,ye: 4,ae: 5,bh: 5,eg: 5,il: 5,iq: 5,jo: 5,kw: 5,ly: 5,ma: 5,qa: 5,sd: 5,sy: 5,tn: 5}, _69d = {af: 5,dz: 5,ir: 5,om: 5,sa: 5,ye: 5,ae: 6,bh: 5,eg: 6,il: 6,iq: 6,jo: 6,kw: 6,ly: 6,ma: 6,qa: 6,sd: 6,sy: 6,tn: 6}, _69e = _695._region(_69b), _69f = _69c[_69e], end = _69d[_69e];
if (_69f === undefined) {
_69f = 6;
}
if (end === undefined) {
end = 0;
}
return {start: _69f,end: end};
};
return _695;
});
},"dojo/i18n": function() {
define(["./_base/kernel", "require", "./has", "./_base/array", "./_base/config", "./_base/lang", "./_base/xhr", "./json", "module"], function(dojo, _6a0, has, _6a1, _6a2, lang, xhr, json, _6a3) {
has.add("dojo-preload-i18n-Api", 1);
1 || has.add("dojo-v1x-i18n-Api", 1);
var _6a4 = dojo.i18n = {}, _6a5 = /(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/, _6a6 = function(root, _6a7, _6a8, _6a9) {
for (var _6aa = [_6a8 + _6a9], _6ab = _6a7.split("-"), _6ac = "", i = 0; i < _6ab.length; i++) {
_6ac += (_6ac ? "-" : "") + _6ab[i];
if (!root || root[_6ac]) {
_6aa.push(_6a8 + _6ac + "/" + _6a9);
}
}
return _6aa;
}, _6ad = {}, _6ae = function(_6af, _6b0, _6b1) {
_6b1 = _6b1 ? _6b1.toLowerCase() : dojo.locale;
_6af = _6af.replace(/\./g, "/");
_6b0 = _6b0.replace(/\./g, "/");
return (/root/i.test(_6b1)) ? (_6af + "/nls/" + _6b0) : (_6af + "/nls/" + _6b1 + "/" + _6b0);
}, _6b2 = dojo.getL10nName = function(_6b3, _6b4, _6b5) {
return _6b3 = _6a3.id + "!" + _6ae(_6b3, _6b4, _6b5);
}, _6b6 = function(_6b7, _6b8, _6b9, _6ba, _6bb, load) {
_6b7([_6b8], function(root) {
var _6bc = lang.clone(root.root), _6bd = _6a6(!root._v1x && root, _6bb, _6b9, _6ba);
_6b7(_6bd, function() {
for (var i = 1; i < _6bd.length; i++) {
_6bc = lang.mixin(lang.clone(_6bc), arguments[i]);
}
var _6be = _6b8 + "/" + _6bb;
_6ad[_6be] = _6bc;
load();
});
});
}, _6bf = function(id, _6c0) {
return /^\./.test(id) ? _6c0(id) : id;
}, _6c1 = function(_6c2) {
var list = _6a2.extraLocale || [];
list = lang.isArray(list) ? list : [list];
list.push(_6c2);
return list;
}, load = function(id, _6c3, load) {
if (has("dojo-preload-i18n-Api")) {
var _6c4 = id.split("*"), _6c5 = _6c4[1] == "preload";
if (_6c5) {
if (!_6ad[id]) {
_6ad[id] = 1;
_6c6(_6c4[2], json.parse(_6c4[3]), 1, _6c3);
}
load(1);
}
if (_6c5 || _6c7(id, _6c3, load)) {
return;
}
}
var _6c8 = _6a5.exec(id), _6c9 = _6c8[1] + "/", _6ca = _6c8[5] || _6c8[4], _6cb = _6c9 + _6ca, _6cc = (_6c8[5] && _6c8[4]), _6cd = _6cc || dojo.locale, _6ce = _6cb + "/" + _6cd, _6cf = _6cc ? [_6cd] : _6c1(_6cd), _6d0 = _6cf.length, _6d1 = function() {
if (!--_6d0) {
load(lang.delegate(_6ad[_6ce]));
}
};
_6a1.forEach(_6cf, function(_6d2) {
var _6d3 = _6cb + "/" + _6d2;
if (has("dojo-preload-i18n-Api")) {
_6d4(_6d3);
}
if (!_6ad[_6d3]) {
_6b6(_6c3, _6cb, _6c9, _6ca, _6d2, _6d1);
} else {
_6d1();
}
});
};
if (has("dojo-unit-tests")) {
var _6d5 = _6a4.unitTests = [];
}
if (has("dojo-preload-i18n-Api") || 1) {
var _6d6 = _6a4.normalizeLocale = function(_6d7) {
var _6d8 = _6d7 ? _6d7.toLowerCase() : dojo.locale;
return _6d8 == "root" ? "ROOT" : _6d8;
}, isXd = function(mid, _6d9) {
return (1 && 1) ? _6d9.isXdUrl(_6a0.toUrl(mid + ".js")) : true;
}, _6da = 0, _6db = [], _6c6 = _6a4._preloadLocalizations = function(_6dc, _6dd, _6de, _6df) {
_6df = _6df || _6a0;
function _6e0(mid, _6e1) {
if (isXd(mid, _6df) || _6de) {
_6df([mid], _6e1);
} else {
_6eb([mid], _6e1, _6df);
}
}
;
function _6e2(_6e3, func) {
var _6e4 = _6e3.split("-");
while (_6e4.length) {
if (func(_6e4.join("-"))) {
return;
}
_6e4.pop();
}
func("ROOT");
}
;
function _6e5(_6e6) {
_6e6 = _6d6(_6e6);
_6e2(_6e6, function(loc) {
if (_6a1.indexOf(_6dd, loc) >= 0) {
var mid = _6dc.replace(/\./g, "/") + "_" + loc;
_6da++;
_6e0(mid, function(_6e7) {
for (var p in _6e7) {
_6ad[_6a0.toAbsMid(p) + "/" + loc] = _6e7[p];
}
--_6da;
while (!_6da && _6db.length) {
load.apply(null, _6db.shift());
}
});
return true;
}
return false;
});
}
;
_6e5();
_6a1.forEach(dojo.config.extraLocale, _6e5);
}, _6c7 = function(id, _6e8, load) {
if (_6da) {
_6db.push([id, _6e8, load]);
}
return _6da;
}, _6d4 = function() {
};
}
if (1) {
var _6e9 = {}, _6ea = new Function("__bundle", "__checkForLegacyModules", "__mid", "__amdValue", "var define = function(mid, factory){define.called = 1; __amdValue.result = factory || mid;}," + "\t   require = function(){define.called = 1;};" + "try{" + "define.called = 0;" + "eval(__bundle);" + "if(define.called==1)" + "return __amdValue;" + "if((__checkForLegacyModules = __checkForLegacyModules(__mid)))" + "return __checkForLegacyModules;" + "}catch(e){}" + "try{" + "return eval('('+__bundle+')');" + "}catch(e){" + "return e;" + "}"), _6eb = function(deps, _6ec, _6ed) {
var _6ee = [];
_6a1.forEach(deps, function(mid) {
var url = _6ed.toUrl(mid + ".js");
function load(text) {
var _6ef = _6ea(text, _6d4, mid, _6e9);
if (_6ef === _6e9) {
_6ee.push(_6ad[url] = _6e9.result);
} else {
if (_6ef instanceof Error) {
console.error("failed to evaluate i18n bundle; url=" + url, _6ef);
_6ef = {};
}
_6ee.push(_6ad[url] = (/nls\/[^\/]+\/[^\/]+$/.test(url) ? _6ef : {root: _6ef,_v1x: 1}));
}
}
;
if (_6ad[url]) {
_6ee.push(_6ad[url]);
} else {
var _6f0 = _6ed.syncLoadNls(mid);
if (_6f0) {
_6ee.push(_6f0);
} else {
if (!xhr) {
try {
_6ed.getText(url, true, load);
} catch (e) {
_6ee.push(_6ad[url] = {});
}
} else {
xhr.get({url: url,sync: true,load: load,error: function() {
_6ee.push(_6ad[url] = {});
}});
}
}
}
});
_6ec && _6ec.apply(null, _6ee);
};
_6d4 = function(_6f1) {
for (var _6f2, _6f3 = _6f1.split("/"), _6f4 = dojo.global[_6f3[0]], i = 1; _6f4 && i < _6f3.length - 1; _6f4 = _6f4[_6f3[i++]]) {
}
if (_6f4) {
_6f2 = _6f4[_6f3[i]];
if (!_6f2) {
_6f2 = _6f4[_6f3[i].replace(/-/g, "_")];
}
if (_6f2) {
_6ad[_6f1] = _6f2;
}
}
return _6f2;
};
_6a4.getLocalization = function(_6f5, _6f6, _6f7) {
var _6f8, _6f9 = _6ae(_6f5, _6f6, _6f7);
load(_6f9, (!isXd(_6f9, _6a0) ? function(deps, _6fa) {
_6eb(deps, _6fa, _6a0);
} : _6a0), function(_6fb) {
_6f8 = _6fb;
});
return _6f8;
};
if (has("dojo-unit-tests")) {
_6d5.push(function(doh) {
doh.register("tests.i18n.unit", function(t) {
var _6fc;
_6fc = _6ea("{prop:1}", _6d4, "nonsense", _6e9);
t.is({prop: 1}, _6fc);
t.is(undefined, _6fc[1]);
_6fc = _6ea("({prop:1})", _6d4, "nonsense", _6e9);
t.is({prop: 1}, _6fc);
t.is(undefined, _6fc[1]);
_6fc = _6ea("{'prop-x':1}", _6d4, "nonsense", _6e9);
t.is({"prop-x": 1}, _6fc);
t.is(undefined, _6fc[1]);
_6fc = _6ea("({'prop-x':1})", _6d4, "nonsense", _6e9);
t.is({"prop-x": 1}, _6fc);
t.is(undefined, _6fc[1]);
_6fc = _6ea("define({'prop-x':1})", _6d4, "nonsense", _6e9);
t.is(_6e9, _6fc);
t.is({"prop-x": 1}, _6e9.result);
_6fc = _6ea("define('some/module', {'prop-x':1})", _6d4, "nonsense", _6e9);
t.is(_6e9, _6fc);
t.is({"prop-x": 1}, _6e9.result);
_6fc = _6ea("this is total nonsense and should throw an error", _6d4, "nonsense", _6e9);
t.is(_6fc instanceof Error, true);
});
});
}
}
return lang.mixin(_6a4, {dynamic: true,normalize: _6bf,load: load,cache: _6ad});
});
},"dojo/regexp": function() {
define(["./_base/kernel", "./_base/lang"], function(dojo, lang) {
var _6fd = {};
lang.setObject("dojo.regexp", _6fd);
_6fd.escapeString = function(str, _6fe) {
return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function(ch) {
if (_6fe && _6fe.indexOf(ch) != -1) {
return ch;
}
return "\\" + ch;
});
};
_6fd.buildGroupRE = function(arr, re, _6ff) {
if (!(arr instanceof Array)) {
return re(arr);
}
var b = [];
for (var i = 0; i < arr.length; i++) {
b.push(re(arr[i]));
}
return _6fd.group(b.join("|"), _6ff);
};
_6fd.group = function(_700, _701) {
return "(" + (_701 ? "?:" : "") + _700 + ")";
};
return _6fd;
});
},"dojox/mobile/SpinWheel": function() {
define("dojox/mobile/SpinWheel", ["dojo/_base/declare", "dojo/dom-construct", "./_PickerBase", "./SpinWheelSlot"], function(_702, _703, _704) {
return _702("dojox.mobile.SpinWheel", _704, {baseClass: "mblSpinWheel",buildRendering: function() {
this.inherited(arguments);
_703.create("div", {className: "mblSpinWheelBar"}, this.domNode);
},startup: function() {
if (this._started) {
return;
}
this.centerPos = Math.round(this.domNode.offsetHeight / 2);
this.inherited(arguments);
},addChild: function(_705, _706) {
this.inherited(arguments);
if (this._started) {
_705.setInitialValue();
}
}});
});
},"dojox/mobile/_PickerBase": function() {
define("dojox/mobile/_PickerBase", ["dojo/_base/array", "dojo/_base/declare", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase"], function(_707, _708, _709, _70a, _70b) {
return _708("dojox.mobile._PickerBase", [_70b, _70a, _709], {slotClasses: [],slotProps: [],slotOrder: [],buildRendering: function() {
this.inherited(arguments);
this.slots = [];
for (var i = 0; i < this.slotClasses.length; i++) {
var idx = this.slotOrder.length ? this.slotOrder[i] : i;
var slot = new this.slotClasses[idx](this.slotProps[idx]);
this.addChild(slot);
this.slots[idx] = slot;
}
},startup: function() {
if (this._started) {
return;
}
this.inherited(arguments);
this.reset();
},getSlots: function() {
return this.slots.length ? this.slots : _707.filter(this.getChildren(), function(c) {
return c.declaredClass.indexOf("Slot") !== -1;
});
},_getValuesAttr: function() {
return _707.map(this.getSlots(), function(w) {
return w.get("value");
});
},_setValuesAttr: function(a) {
_707.forEach(this.getSlots(), function(w, i) {
w.set("value", a[i]);
});
},_setColorsAttr: function(a) {
_707.forEach(this.getSlots(), function(w, i) {
w.setColor && w.setColor(a[i]);
});
},reset: function() {
_707.forEach(this.getSlots(), function(w) {
w.setInitialValue();
});
}});
});
},"dojox/mobile/SpinWheelSlot": function() {
define("dojox/mobile/SpinWheelSlot", ["dojo/_base/kernel", "dojo/_base/array", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom-class", "dojo/dom-construct", "dijit/_Contained", "dijit/_WidgetBase", "./scrollable"], function(dojo, _70c, _70d, lang, win, _70e, _70f, _710, _711, _712) {
return _70d("dojox.mobile.SpinWheelSlot", [_711, _710, _712], {items: [],labels: [],labelFrom: 0,labelTo: 0,zeroPad: 0,value: "",step: 1,tabIndex: "0",_setTabIndexAttr: "",baseClass: "mblSpinWheelSlot",maxSpeed: 500,minItems: 15,centerPos: 0,scrollBar: false,constraint: false,propagatable: false,androidWorkaroud: false,buildRendering: function() {
this.inherited(arguments);
this.initLabels();
if (this.labels.length > 0) {
this.items = [];
for (i = 0; i < this.labels.length; i++) {
this.items.push([i, this.labels[i]]);
}
}
this.containerNode = _70f.create("div", {className: "mblSpinWheelSlotContainer"});
this.containerNode.style.height = (win.global.innerHeight || win.doc.documentElement.clientHeight) * 2 + "px";
this.panelNodes = [];
for (var k = 0; k < 3; k++) {
this.panelNodes[k] = _70f.create("div", {className: "mblSpinWheelSlotPanel"});
var len = this.items.length;
var n = Math.ceil(this.minItems / len);
for (j = 0; j < n; j++) {
for (i = 0; i < len; i++) {
_70f.create("div", {className: "mblSpinWheelSlotLabel",name: this.items[i][0],val: this.items[i][1],innerHTML: this._cv ? this._cv(this.items[i][1]) : this.items[i][1]}, this.panelNodes[k]);
}
}
this.containerNode.appendChild(this.panelNodes[k]);
}
this.domNode.appendChild(this.containerNode);
this.touchNode = _70f.create("div", {className: "mblSpinWheelSlotTouch"}, this.domNode);
this.setSelectable(this.domNode, false);
if (this.value === "" && this.items.length > 0) {
this.value = this.items[0][1];
}
this._initialValue = this.value;
},startup: function() {
if (this._started) {
return;
}
this.inherited(arguments);
this.noResize = true;
this.init();
this.centerPos = this.getParent().centerPos;
var _713 = this.panelNodes[1].childNodes;
this._itemHeight = _713[0].offsetHeight;
this.adjust();
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onKeyDown");
},initLabels: function() {
if (this.labelFrom !== this.labelTo) {
var a = this.labels = [], _714 = this.zeroPad && Array(this.zeroPad).join("0");
for (var i = this.labelFrom; i <= this.labelTo; i += this.step) {
a.push(this.zeroPad ? (_714 + i).slice(-this.zeroPad) : i + "");
}
}
},adjust: function() {
var _715 = this.panelNodes[1].childNodes;
var _716;
for (var i = 0, len = _715.length; i < len; i++) {
var item = _715[i];
if (item.offsetTop <= this.centerPos && this.centerPos < item.offsetTop + item.offsetHeight) {
_716 = this.centerPos - (item.offsetTop + Math.round(item.offsetHeight / 2));
break;
}
}
var h = this.panelNodes[0].offsetHeight;
this.panelNodes[0].style.top = -h + _716 + "px";
this.panelNodes[1].style.top = _716 + "px";
this.panelNodes[2].style.top = h + _716 + "px";
},setInitialValue: function() {
this.set("value", this._initialValue);
},_onKeyDown: function(e) {
if (!e || e.type !== "keydown") {
return;
}
if (e.keyCode === 40) {
this.spin(-1);
} else {
if (e.keyCode === 38) {
this.spin(1);
}
}
},_getCenterPanel: function() {
var pos = this.getPos();
for (var i = 0, len = this.panelNodes.length; i < len; i++) {
var top = pos.y + this.panelNodes[i].offsetTop;
if (top <= this.centerPos && this.centerPos < top + this.panelNodes[i].offsetHeight) {
return this.panelNodes[i];
}
}
return null;
},setColor: function(_717, _718) {
_70c.forEach(this.panelNodes, function(_719) {
_70c.forEach(_719.childNodes, function(node, i) {
_70e.toggle(node, _718 || "mblSpinWheelSlotLabelBlue", node.innerHTML === _717);
}, this);
}, this);
},disableValues: function(n) {
_70c.forEach(this.panelNodes, function(_71a) {
for (var i = 27; i < 31; i++) {
_70e.toggle(_71a.childNodes[i], "mblSpinWheelSlotLabelGray", i >= nDays);
}
});
},getCenterItem: function() {
var pos = this.getPos();
var _71b = this._getCenterPanel();
if (_71b) {
var top = pos.y + _71b.offsetTop;
var _71c = _71b.childNodes;
for (var i = 0, len = _71c.length; i < len; i++) {
if (top + _71c[i].offsetTop <= this.centerPos && this.centerPos < top + _71c[i].offsetTop + _71c[i].offsetHeight) {
return _71c[i];
}
}
}
return null;
},_getKeyAttr: function() {
var item = this.getCenterItem();
return (item && item.getAttribute("name"));
},_getValueAttr: function() {
var item = this.getCenterItem();
return (item && item.getAttribute("val"));
},_setValueAttr: function(_71d) {
var idx0, idx1;
var _71e = this.get("value");
if (!_71e) {
this._penddingValue = _71d;
return;
}
this._penddingValue = undefined;
this._set("value", _71d);
var n = this.items.length;
for (var i = 0; i < n; i++) {
if (this.items[i][1] === String(_71e)) {
idx0 = i;
}
if (this.items[i][1] === String(_71d)) {
idx1 = i;
}
if (idx0 !== undefined && idx1 !== undefined) {
break;
}
}
var d = idx1 - (idx0 || 0);
var m;
if (d > 0) {
m = (d < n - d) ? -d : n - d;
} else {
m = (-d < n + d) ? -d : -(n + d);
}
this.spin(m);
},stopAnimation: function() {
this.inherited(arguments);
this._set("value", this.get("value"));
},spin: function(_71f) {
if (!this._started) {
return;
}
var to = this.getPos();
if (to.y % this._itemHeight) {
return;
}
to.y += _71f * this._itemHeight;
this.slideTo(to, 1);
},getSpeed: function() {
var y = 0, n = this._time.length;
var _720 = (new Date()).getTime() - this.startTime - this._time[n - 1];
if (n >= 2 && _720 < 200) {
var dy = this._posY[n - 1] - this._posY[(n - 6) >= 0 ? n - 6 : 0];
var dt = this._time[n - 1] - this._time[(n - 6) >= 0 ? n - 6 : 0];
y = this.calcSpeed(dy, dt);
}
return {x: 0,y: y};
},calcSpeed: function(d, t) {
var _721 = this.inherited(arguments);
if (!_721) {
return 0;
}
var v = Math.abs(_721);
var ret = _721;
if (v > this.maxSpeed) {
ret = this.maxSpeed * (_721 / v);
}
return ret;
},adjustDestination: function(to, pos, dim) {
var h = this._itemHeight;
var j = to.y + Math.round(h / 2);
var a = Math.abs(j);
var r = j >= 0 ? j % h : j % h + h;
to.y = j - r;
return true;
},resize: function(e) {
if (this._penddingValue) {
this.set("value", this._penddingValue);
}
},slideTo: function(to, _722, _723) {
var pos = this.getPos();
var top = pos.y + this.panelNodes[1].offsetTop;
var _724 = top + this.panelNodes[1].offsetHeight;
var vh = this.domNode.parentNode.offsetHeight;
var t;
if (pos.y < to.y) {
if (_724 > vh) {
t = this.panelNodes[2];
t.style.top = this.panelNodes[0].offsetTop - this.panelNodes[0].offsetHeight + "px";
this.panelNodes[2] = this.panelNodes[1];
this.panelNodes[1] = this.panelNodes[0];
this.panelNodes[0] = t;
}
} else {
if (pos.y > to.y) {
if (top < 0) {
t = this.panelNodes[0];
t.style.top = this.panelNodes[2].offsetTop + this.panelNodes[2].offsetHeight + "px";
this.panelNodes[0] = this.panelNodes[1];
this.panelNodes[1] = this.panelNodes[2];
this.panelNodes[2] = t;
}
}
}
if (!this._initialized) {
_722 = 0;
this._initialized = true;
} else {
if (Math.abs(this._speed.y) < 40) {
_722 = 0.2;
}
}
this.inherited(arguments, [to, _722, _723]);
}});
});
},"dojox/app/widgets/Container": function() {
define("dojox/app/widgets/Container", ["dojo/_base/declare", "dojo/_base/lang", "dijit/registry", "dojo/dom-attr", "dojo/dom-geometry", "dojo/dom-style", "dijit/_WidgetBase", "dijit/_Container", "dijit/_Contained", "dojo/_base/array", "dojo/query", "../layout/utils", "./_ScrollableMixin"], function(_725, lang, _726, _727, _728, _729, _72a, _72b, _72c, _72d, _72e, _72f, _730) {
return _725("dojox.app.widgets.Container", [_72a, _72b, _72c, _730], {scrollable: false,buildRendering: function() {
if (!this.region) {
this.region = "center";
_727.set(this.srcNodeRef, "data-app-region", "center");
}
this.inherited(arguments);
_729.set(this.domNode, "overflow-x", "hidden");
_729.set(this.domNode, "overflow-y", "auto");
if (this.scrollable) {
this.inherited(arguments);
this.domNode.style.position = "absolute";
this.domNode.style.width = "100%";
this.domNode.style.height = "100%";
}
},startup: function() {
if (this._started) {
return;
}
if (this.scrollable) {
this.inherited(arguments);
}
this._started = true;
},resize: function(_731, _732) {
var node = this.domNode;
if (_731) {
_728.setMarginBox(node, _731);
}
var mb = _732 || {};
lang.mixin(mb, _731 || {});
if (!("h" in mb) || !("w" in mb)) {
mb = lang.mixin(_728.getMarginBox(node), mb);
}
var cs = _729.getComputedStyle(node);
var me = _728.getMarginExtents(node, cs);
var be = _728.getBorderExtents(node, cs);
var bb = (this._borderBox = {w: mb.w - (me.w + be.w),h: mb.h - (me.h + be.h)});
var pe = _728.getPadExtents(node, cs);
this._contentBox = {l: _729.toPixelValue(node, cs.paddingLeft),t: _729.toPixelValue(node, cs.paddingTop),w: bb.w - pe.w,h: bb.h - pe.h};
this.layout();
},layout: function() {
children = _72e("> [data-app-region], > [region]", this.domNode).map(function(node) {
var w = _726.getEnclosingWidget(node);
if (w) {
w.region = _727.get(node, "data-app-region") || _727.get(node, "region");
return w;
}
return {domNode: node,region: _727.get(node, "data-app-region") || dom.Attr.get(node, "region")};
});
if (this._contentBox) {
_72f.layoutChildren(this.domNode, this._contentBox, children);
}
_72d.forEach(this.getChildren(), function(_733) {
if (!_733._started && _733.startup) {
_733.startup();
}
});
}});
});
},"dojox/app/widgets/_ScrollableMixin": function() {
define("dojox/app/widgets/_ScrollableMixin", ["dojo/_base/declare", "dojo/_base/lang", "dojo/dom-class", "dojo/dom-construct", "dojox/mobile/scrollable"], function(_734, lang, _735, _736, _737) {
var cls = _734("dojox.app.widgets._ScrollableMixin", null, {scrollableParams: null,allowNestedScrolls: true,constructor: function() {
this.scrollableParams = {noResize: true};
},destroy: function() {
this.cleanup();
this.inherited(arguments);
},startup: function() {
if (this._started) {
return;
}
var _738 = this.scrollableParams;
this.init(_738);
this.inherited(arguments);
this.reparent();
},buildRendering: function() {
this.inherited(arguments);
_735.add(this.domNode, "mblScrollableView");
this.domNode.style.overflow = "hidden";
this.domNode.style.top = "0px";
this.containerNode = _736.create("div", {className: "mblScrollableViewContainer"}, this.domNode);
this.containerNode.style.position = "absolute";
this.containerNode.style.top = "0px";
if (this.scrollDir === "v") {
this.containerNode.style.width = "100%";
}
},reparent: function() {
var i, idx, len, c;
for (i = 0, idx = 0, len = this.domNode.childNodes.length; i < len; i++) {
c = this.domNode.childNodes[idx];
if (c === this.containerNode) {
idx++;
continue;
}
this.containerNode.appendChild(this.domNode.removeChild(c));
}
},resize: function() {
this.inherited(arguments);
array.forEach(this.getChildren(), function(_739) {
if (_739.resize) {
_739.resize();
}
});
}});
lang.extend(cls, new _737());
return cls;
});
},"dojo/store/Memory": function() {
define(["../_base/declare", "./util/QueryResults", "./util/SimpleQueryEngine"], function(_73a, _73b, _73c) {
var base = null;
return _73a("dojo.store.Memory", base, {constructor: function(_73d) {
for (var i in _73d) {
this[i] = _73d[i];
}
this.setData(this.data || []);
},data: null,idProperty: "id",index: null,queryEngine: _73c,get: function(id) {
return this.data[this.index[id]];
},getIdentity: function(_73e) {
return _73e[this.idProperty];
},put: function(_73f, _740) {
var data = this.data, _741 = this.index, _742 = this.idProperty;
var id = _73f[_742] = (_740 && "id" in _740) ? _740.id : _742 in _73f ? _73f[_742] : Math.random();
if (id in _741) {
if (_740 && _740.overwrite === false) {
throw new Error("Object already exists");
}
data[_741[id]] = _73f;
} else {
_741[id] = data.push(_73f) - 1;
}
return id;
},add: function(_743, _744) {
(_744 = _744 || {}).overwrite = false;
return this.put(_743, _744);
},remove: function(id) {
var _745 = this.index;
var data = this.data;
if (id in _745) {
data.splice(_745[id], 1);
this.setData(data);
return true;
}
},query: function(_746, _747) {
return _73b(this.queryEngine(_746, _747)(this.data));
},setData: function(data) {
if (data.items) {
this.idProperty = data.identifier;
data = this.data = data.items;
} else {
this.data = data;
}
this.index = {};
for (var i = 0, l = data.length; i < l; i++) {
this.index[data[i][this.idProperty]] = i;
}
}});
});
},"dojo/store/util/QueryResults": function() {
define(["../../_base/array", "../../_base/lang", "../../_base/Deferred"], function(_748, lang, _749) {
var _74a = function(_74b) {
if (!_74b) {
return _74b;
}
if (_74b.then) {
_74b = lang.delegate(_74b);
}
function _74c(_74d) {
if (!_74b[_74d]) {
_74b[_74d] = function() {
var args = arguments;
return _749.when(_74b, function(_74e) {
Array.prototype.unshift.call(args, _74e);
return _74a(_748[_74d].apply(_748, args));
});
};
}
}
;
_74c("forEach");
_74c("filter");
_74c("map");
if (!_74b.total) {
_74b.total = _749.when(_74b, function(_74f) {
return _74f.length;
});
}
return _74b;
};
lang.setObject("dojo.store.util.QueryResults", _74a);
return _74a;
});
},"dojo/store/util/SimpleQueryEngine": function() {
define(["../../_base/array"], function(_750) {
return function(_751, _752) {
switch (typeof _751) {
default:
throw new Error("Can not query with a " + typeof _751);
case "object":
case "undefined":
var _753 = _751;
_751 = function(_754) {
for (var key in _753) {
var _755 = _753[key];
if (_755 && _755.test) {
if (!_755.test(_754[key], _754)) {
return false;
}
} else {
if (_755 != _754[key]) {
return false;
}
}
}
return true;
};
break;
case "string":
if (!this[_751]) {
throw new Error("No filter function " + _751 + " was found in store");
}
_751 = this[_751];
case "function":
}
function _756(_757) {
var _758 = _750.filter(_757, _751);
var _759 = _752 && _752.sort;
if (_759) {
_758.sort(typeof _759 == "function" ? _759 : function(a, b) {
for (var sort, i = 0; sort = _759[i]; i++) {
var _75a = a[sort.attribute];
var _75b = b[sort.attribute];
if (_75a != _75b) {
return !!sort.descending == (_75a == null || _75a > _75b) ? -1 : 1;
}
}
return 0;
});
}
if (_752 && (_752.start || _752.count)) {
var _75c = _758.length;
_758 = _758.slice(_752.start || 0, (_752.start || 0) + (_752.count || Infinity));
_758.total = _75c;
}
return _758;
}
;
_756.matches = _751;
return _756;
};
});
},"dojo/data/ItemFileWriteStore": function() {
define(["../_base/lang", "../_base/declare", "../_base/array", "../_base/json", "../_base/kernel", "./ItemFileReadStore", "../date/stamp"], function(lang, _75d, _75e, _75f, _760, _761, _762) {
return _75d("dojo.data.ItemFileWriteStore", _761, {constructor: function(_763) {
this._features["dojo.data.api.Write"] = true;
this._features["dojo.data.api.Notification"] = true;
this._pending = {_newItems: {},_modifiedItems: {},_deletedItems: {}};
if (!this._datatypeMap["Date"].serialize) {
this._datatypeMap["Date"].serialize = function(obj) {
return _762.toISOString(obj, {zulu: true});
};
}
if (_763 && (_763.referenceIntegrity === false)) {
this.referenceIntegrity = false;
}
this._saveInProgress = false;
},referenceIntegrity: true,_assert: function(_764) {
if (!_764) {
throw new Error("assertion failed in ItemFileWriteStore");
}
},_getIdentifierAttribute: function() {
return this.getFeatures()["dojo.data.api.Identity"];
},newItem: function(_765, _766) {
this._assert(!this._saveInProgress);
if (!this._loadFinished) {
this._forceLoad();
}
if (typeof _765 != "object" && typeof _765 != "undefined") {
throw new Error("newItem() was passed something other than an object");
}
var _767 = null;
var _768 = this._getIdentifierAttribute();
if (_768 === Number) {
_767 = this._arrayOfAllItems.length;
} else {
_767 = _765[_768];
if (typeof _767 === "undefined") {
throw new Error("newItem() was not passed an identity for the new item");
}
if (lang.isArray(_767)) {
throw new Error("newItem() was not passed an single-valued identity");
}
}
if (this._itemsByIdentity) {
this._assert(typeof this._itemsByIdentity[_767] === "undefined");
}
this._assert(typeof this._pending._newItems[_767] === "undefined");
this._assert(typeof this._pending._deletedItems[_767] === "undefined");
var _769 = {};
_769[this._storeRefPropName] = this;
_769[this._itemNumPropName] = this._arrayOfAllItems.length;
if (this._itemsByIdentity) {
this._itemsByIdentity[_767] = _769;
_769[_768] = [_767];
}
this._arrayOfAllItems.push(_769);
var _76a = null;
if (_766 && _766.parent && _766.attribute) {
_76a = {item: _766.parent,attribute: _766.attribute,oldValue: undefined};
var _76b = this.getValues(_766.parent, _766.attribute);
if (_76b && _76b.length > 0) {
var _76c = _76b.slice(0, _76b.length);
if (_76b.length === 1) {
_76a.oldValue = _76b[0];
} else {
_76a.oldValue = _76b.slice(0, _76b.length);
}
_76c.push(_769);
this._setValueOrValues(_766.parent, _766.attribute, _76c, false);
_76a.newValue = this.getValues(_766.parent, _766.attribute);
} else {
this._setValueOrValues(_766.parent, _766.attribute, _769, false);
_76a.newValue = _769;
}
} else {
_769[this._rootItemPropName] = true;
this._arrayOfTopLevelItems.push(_769);
}
this._pending._newItems[_767] = _769;
for (var key in _765) {
if (key === this._storeRefPropName || key === this._itemNumPropName) {
throw new Error("encountered bug in ItemFileWriteStore.newItem");
}
var _76d = _765[key];
if (!lang.isArray(_76d)) {
_76d = [_76d];
}
_769[key] = _76d;
if (this.referenceIntegrity) {
for (var i = 0; i < _76d.length; i++) {
var val = _76d[i];
if (this.isItem(val)) {
this._addReferenceToMap(val, _769, key);
}
}
}
}
this.onNew(_769, _76a);
return _769;
},_removeArrayElement: function(_76e, _76f) {
var _770 = _75e.indexOf(_76e, _76f);
if (_770 != -1) {
_76e.splice(_770, 1);
return true;
}
return false;
},deleteItem: function(item) {
this._assert(!this._saveInProgress);
this._assertIsItem(item);
var _771 = item[this._itemNumPropName];
var _772 = this.getIdentity(item);
if (this.referenceIntegrity) {
var _773 = this.getAttributes(item);
if (item[this._reverseRefMap]) {
item["backup_" + this._reverseRefMap] = lang.clone(item[this._reverseRefMap]);
}
_75e.forEach(_773, function(_774) {
_75e.forEach(this.getValues(item, _774), function(_775) {
if (this.isItem(_775)) {
if (!item["backupRefs_" + this._reverseRefMap]) {
item["backupRefs_" + this._reverseRefMap] = [];
}
item["backupRefs_" + this._reverseRefMap].push({id: this.getIdentity(_775),attr: _774});
this._removeReferenceFromMap(_775, item, _774);
}
}, this);
}, this);
var _776 = item[this._reverseRefMap];
if (_776) {
for (var _777 in _776) {
var _778 = null;
if (this._itemsByIdentity) {
_778 = this._itemsByIdentity[_777];
} else {
_778 = this._arrayOfAllItems[_777];
}
if (_778) {
for (var _779 in _776[_777]) {
var _77a = this.getValues(_778, _779) || [];
var _77b = _75e.filter(_77a, function(_77c) {
return !(this.isItem(_77c) && this.getIdentity(_77c) == _772);
}, this);
this._removeReferenceFromMap(item, _778, _779);
if (_77b.length < _77a.length) {
this._setValueOrValues(_778, _779, _77b, true);
}
}
}
}
}
}
this._arrayOfAllItems[_771] = null;
item[this._storeRefPropName] = null;
if (this._itemsByIdentity) {
delete this._itemsByIdentity[_772];
}
this._pending._deletedItems[_772] = item;
if (item[this._rootItemPropName]) {
this._removeArrayElement(this._arrayOfTopLevelItems, item);
}
this.onDelete(item);
return true;
},setValue: function(item, _77d, _77e) {
return this._setValueOrValues(item, _77d, _77e, true);
},setValues: function(item, _77f, _780) {
return this._setValueOrValues(item, _77f, _780, true);
},unsetAttribute: function(item, _781) {
return this._setValueOrValues(item, _781, [], true);
},_setValueOrValues: function(item, _782, _783, _784) {
this._assert(!this._saveInProgress);
this._assertIsItem(item);
this._assert(lang.isString(_782));
this._assert(typeof _783 !== "undefined");
var _785 = this._getIdentifierAttribute();
if (_782 == _785) {
throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
}
var _786 = this._getValueOrValues(item, _782);
var _787 = this.getIdentity(item);
if (!this._pending._modifiedItems[_787]) {
var _788 = {};
for (var key in item) {
if ((key === this._storeRefPropName) || (key === this._itemNumPropName) || (key === this._rootItemPropName)) {
_788[key] = item[key];
} else {
if (key === this._reverseRefMap) {
_788[key] = lang.clone(item[key]);
} else {
_788[key] = item[key].slice(0, item[key].length);
}
}
}
this._pending._modifiedItems[_787] = _788;
}
var _789 = false;
if (lang.isArray(_783) && _783.length === 0) {
_789 = delete item[_782];
_783 = undefined;
if (this.referenceIntegrity && _786) {
var _78a = _786;
if (!lang.isArray(_78a)) {
_78a = [_78a];
}
for (var i = 0; i < _78a.length; i++) {
var _78b = _78a[i];
if (this.isItem(_78b)) {
this._removeReferenceFromMap(_78b, item, _782);
}
}
}
} else {
var _78c;
if (lang.isArray(_783)) {
_78c = _783.slice(0, _783.length);
} else {
_78c = [_783];
}
if (this.referenceIntegrity) {
if (_786) {
var _78a = _786;
if (!lang.isArray(_78a)) {
_78a = [_78a];
}
var map = {};
_75e.forEach(_78a, function(_78d) {
if (this.isItem(_78d)) {
var id = this.getIdentity(_78d);
map[id.toString()] = true;
}
}, this);
_75e.forEach(_78c, function(_78e) {
if (this.isItem(_78e)) {
var id = this.getIdentity(_78e);
if (map[id.toString()]) {
delete map[id.toString()];
} else {
this._addReferenceToMap(_78e, item, _782);
}
}
}, this);
for (var rId in map) {
var _78f;
if (this._itemsByIdentity) {
_78f = this._itemsByIdentity[rId];
} else {
_78f = this._arrayOfAllItems[rId];
}
this._removeReferenceFromMap(_78f, item, _782);
}
} else {
for (var i = 0; i < _78c.length; i++) {
var _78b = _78c[i];
if (this.isItem(_78b)) {
this._addReferenceToMap(_78b, item, _782);
}
}
}
}
item[_782] = _78c;
_789 = true;
}
if (_784) {
this.onSet(item, _782, _786, _783);
}
return _789;
},_addReferenceToMap: function(_790, _791, _792) {
var _793 = this.getIdentity(_791);
var _794 = _790[this._reverseRefMap];
if (!_794) {
_794 = _790[this._reverseRefMap] = {};
}
var _795 = _794[_793];
if (!_795) {
_795 = _794[_793] = {};
}
_795[_792] = true;
},_removeReferenceFromMap: function(_796, _797, _798) {
var _799 = this.getIdentity(_797);
var _79a = _796[this._reverseRefMap];
var _79b;
if (_79a) {
for (_79b in _79a) {
if (_79b == _799) {
delete _79a[_79b][_798];
if (this._isEmpty(_79a[_79b])) {
delete _79a[_79b];
}
}
}
if (this._isEmpty(_79a)) {
delete _796[this._reverseRefMap];
}
}
},_dumpReferenceMap: function() {
var i;
for (i = 0; i < this._arrayOfAllItems.length; i++) {
var item = this._arrayOfAllItems[i];
if (item && item[this._reverseRefMap]) {
}
}
},_getValueOrValues: function(item, _79c) {
var _79d = undefined;
if (this.hasAttribute(item, _79c)) {
var _79e = this.getValues(item, _79c);
if (_79e.length == 1) {
_79d = _79e[0];
} else {
_79d = _79e;
}
}
return _79d;
},_flatten: function(_79f) {
if (this.isItem(_79f)) {
return {_reference: this.getIdentity(_79f)};
} else {
if (typeof _79f === "object") {
for (var type in this._datatypeMap) {
var _7a0 = this._datatypeMap[type];
if (lang.isObject(_7a0) && !lang.isFunction(_7a0)) {
if (_79f instanceof _7a0.type) {
if (!_7a0.serialize) {
throw new Error("ItemFileWriteStore:  No serializer defined for type mapping: [" + type + "]");
}
return {_type: type,_value: _7a0.serialize(_79f)};
}
} else {
if (_79f instanceof _7a0) {
return {_type: type,_value: _79f.toString()};
}
}
}
}
return _79f;
}
},_getNewFileContentString: function() {
var _7a1 = {};
var _7a2 = this._getIdentifierAttribute();
if (_7a2 !== Number) {
_7a1.identifier = _7a2;
}
if (this._labelAttr) {
_7a1.label = this._labelAttr;
}
_7a1.items = [];
for (var i = 0; i < this._arrayOfAllItems.length; ++i) {
var item = this._arrayOfAllItems[i];
if (item !== null) {
var _7a3 = {};
for (var key in item) {
if (key !== this._storeRefPropName && key !== this._itemNumPropName && key !== this._reverseRefMap && key !== this._rootItemPropName) {
var _7a4 = this.getValues(item, key);
if (_7a4.length == 1) {
_7a3[key] = this._flatten(_7a4[0]);
} else {
var _7a5 = [];
for (var j = 0; j < _7a4.length; ++j) {
_7a5.push(this._flatten(_7a4[j]));
_7a3[key] = _7a5;
}
}
}
}
_7a1.items.push(_7a3);
}
}
var _7a6 = true;
return _75f.toJson(_7a1, _7a6);
},_isEmpty: function(_7a7) {
var _7a8 = true;
if (lang.isObject(_7a7)) {
var i;
for (i in _7a7) {
_7a8 = false;
break;
}
} else {
if (lang.isArray(_7a7)) {
if (_7a7.length > 0) {
_7a8 = false;
}
}
}
return _7a8;
},save: function(_7a9) {
this._assert(!this._saveInProgress);
this._saveInProgress = true;
var self = this;
var _7aa = function() {
self._pending = {_newItems: {},_modifiedItems: {},_deletedItems: {}};
self._saveInProgress = false;
if (_7a9 && _7a9.onComplete) {
var _7ab = _7a9.scope || _760.global;
_7a9.onComplete.call(_7ab);
}
};
var _7ac = function(err) {
self._saveInProgress = false;
if (_7a9 && _7a9.onError) {
var _7ad = _7a9.scope || _760.global;
_7a9.onError.call(_7ad, err);
}
};
if (this._saveEverything) {
var _7ae = this._getNewFileContentString();
this._saveEverything(_7aa, _7ac, _7ae);
}
if (this._saveCustom) {
this._saveCustom(_7aa, _7ac);
}
if (!this._saveEverything && !this._saveCustom) {
_7aa();
}
},revert: function() {
this._assert(!this._saveInProgress);
var _7af;
for (_7af in this._pending._modifiedItems) {
var _7b0 = this._pending._modifiedItems[_7af];
var _7b1 = null;
if (this._itemsByIdentity) {
_7b1 = this._itemsByIdentity[_7af];
} else {
_7b1 = this._arrayOfAllItems[_7af];
}
_7b0[this._storeRefPropName] = this;
for (var key in _7b1) {
delete _7b1[key];
}
lang.mixin(_7b1, _7b0);
}
var _7b2;
for (_7af in this._pending._deletedItems) {
_7b2 = this._pending._deletedItems[_7af];
_7b2[this._storeRefPropName] = this;
var _7b3 = _7b2[this._itemNumPropName];
if (_7b2["backup_" + this._reverseRefMap]) {
_7b2[this._reverseRefMap] = _7b2["backup_" + this._reverseRefMap];
delete _7b2["backup_" + this._reverseRefMap];
}
this._arrayOfAllItems[_7b3] = _7b2;
if (this._itemsByIdentity) {
this._itemsByIdentity[_7af] = _7b2;
}
if (_7b2[this._rootItemPropName]) {
this._arrayOfTopLevelItems.push(_7b2);
}
}
for (_7af in this._pending._deletedItems) {
_7b2 = this._pending._deletedItems[_7af];
if (_7b2["backupRefs_" + this._reverseRefMap]) {
_75e.forEach(_7b2["backupRefs_" + this._reverseRefMap], function(_7b4) {
var _7b5;
if (this._itemsByIdentity) {
_7b5 = this._itemsByIdentity[_7b4.id];
} else {
_7b5 = this._arrayOfAllItems[_7b4.id];
}
this._addReferenceToMap(_7b5, _7b2, _7b4.attr);
}, this);
delete _7b2["backupRefs_" + this._reverseRefMap];
}
}
for (_7af in this._pending._newItems) {
var _7b6 = this._pending._newItems[_7af];
_7b6[this._storeRefPropName] = null;
this._arrayOfAllItems[_7b6[this._itemNumPropName]] = null;
if (_7b6[this._rootItemPropName]) {
this._removeArrayElement(this._arrayOfTopLevelItems, _7b6);
}
if (this._itemsByIdentity) {
delete this._itemsByIdentity[_7af];
}
}
this._pending = {_newItems: {},_modifiedItems: {},_deletedItems: {}};
return true;
},isDirty: function(item) {
if (item) {
var _7b7 = this.getIdentity(item);
return new Boolean(this._pending._newItems[_7b7] || this._pending._modifiedItems[_7b7] || this._pending._deletedItems[_7b7]).valueOf();
} else {
return !this._isEmpty(this._pending._newItems) || !this._isEmpty(this._pending._modifiedItems) || !this._isEmpty(this._pending._deletedItems);
}
},onSet: function(item, _7b8, _7b9, _7ba) {
},onNew: function(_7bb, _7bc) {
},onDelete: function(_7bd) {
},close: function(_7be) {
if (this.clearOnClose) {
if (!this.isDirty()) {
this.inherited(arguments);
} else {
throw new Error("dojo.data.ItemFileWriteStore: There are unsaved changes present in the store.  Please save or revert the changes before invoking close.");
}
}
}});
});
},"dojo/data/ItemFileReadStore": function() {
define(["../_base/kernel", "../_base/lang", "../_base/declare", "../_base/array", "../_base/xhr", "../Evented", "./util/filter", "./util/simpleFetch", "../date/stamp"], function(_7bf, lang, _7c0, _7c1, xhr, _7c2, _7c3, _7c4, _7c5) {
var _7c6 = _7c0("dojo.data.ItemFileReadStore", [_7c2], {constructor: function(_7c7) {
this._arrayOfAllItems = [];
this._arrayOfTopLevelItems = [];
this._loadFinished = false;
this._jsonFileUrl = _7c7.url;
this._ccUrl = _7c7.url;
this.url = _7c7.url;
this._jsonData = _7c7.data;
this.data = null;
this._datatypeMap = _7c7.typeMap || {};
if (!this._datatypeMap["Date"]) {
this._datatypeMap["Date"] = {type: Date,deserialize: function(_7c8) {
return _7c5.fromISOString(_7c8);
}};
}
this._features = {"dojo.data.api.Read": true,"dojo.data.api.Identity": true};
this._itemsByIdentity = null;
this._storeRefPropName = "_S";
this._itemNumPropName = "_0";
this._rootItemPropName = "_RI";
this._reverseRefMap = "_RRM";
this._loadInProgress = false;
this._queuedFetches = [];
if (_7c7.urlPreventCache !== undefined) {
this.urlPreventCache = _7c7.urlPreventCache ? true : false;
}
if (_7c7.hierarchical !== undefined) {
this.hierarchical = _7c7.hierarchical ? true : false;
}
if (_7c7.clearOnClose) {
this.clearOnClose = true;
}
if ("failOk" in _7c7) {
this.failOk = _7c7.failOk ? true : false;
}
},url: "",_ccUrl: "",data: null,typeMap: null,clearOnClose: false,urlPreventCache: false,failOk: false,hierarchical: true,_assertIsItem: function(item) {
if (!this.isItem(item)) {
throw new Error(this.declaredClass + ": Invalid item argument.");
}
},_assertIsAttribute: function(_7c9) {
if (typeof _7c9 !== "string") {
throw new Error(this.declaredClass + ": Invalid attribute argument.");
}
},getValue: function(item, _7ca, _7cb) {
var _7cc = this.getValues(item, _7ca);
return (_7cc.length > 0) ? _7cc[0] : _7cb;
},getValues: function(item, _7cd) {
this._assertIsItem(item);
this._assertIsAttribute(_7cd);
return (item[_7cd] || []).slice(0);
},getAttributes: function(item) {
this._assertIsItem(item);
var _7ce = [];
for (var key in item) {
if ((key !== this._storeRefPropName) && (key !== this._itemNumPropName) && (key !== this._rootItemPropName) && (key !== this._reverseRefMap)) {
_7ce.push(key);
}
}
return _7ce;
},hasAttribute: function(item, _7cf) {
this._assertIsItem(item);
this._assertIsAttribute(_7cf);
return (_7cf in item);
},containsValue: function(item, _7d0, _7d1) {
var _7d2 = undefined;
if (typeof _7d1 === "string") {
_7d2 = _7c3.patternToRegExp(_7d1, false);
}
return this._containsValue(item, _7d0, _7d1, _7d2);
},_containsValue: function(item, _7d3, _7d4, _7d5) {
return _7c1.some(this.getValues(item, _7d3), function(_7d6) {
if (_7d6 !== null && !lang.isObject(_7d6) && _7d5) {
if (_7d6.toString().match(_7d5)) {
return true;
}
} else {
if (_7d4 === _7d6) {
return true;
}
}
});
},isItem: function(_7d7) {
if (_7d7 && _7d7[this._storeRefPropName] === this) {
if (this._arrayOfAllItems[_7d7[this._itemNumPropName]] === _7d7) {
return true;
}
}
return false;
},isItemLoaded: function(_7d8) {
return this.isItem(_7d8);
},loadItem: function(_7d9) {
this._assertIsItem(_7d9.item);
},getFeatures: function() {
return this._features;
},getLabel: function(item) {
if (this._labelAttr && this.isItem(item)) {
return this.getValue(item, this._labelAttr);
}
return undefined;
},getLabelAttributes: function(item) {
if (this._labelAttr) {
return [this._labelAttr];
}
return null;
},filter: function(_7da, _7db, _7dc) {
var _7dd = [], i, key;
if (_7da.query) {
var _7de, _7df = _7da.queryOptions ? _7da.queryOptions.ignoreCase : false;
var _7e0 = {};
for (key in _7da.query) {
_7de = _7da.query[key];
if (typeof _7de === "string") {
_7e0[key] = _7c3.patternToRegExp(_7de, _7df);
} else {
if (_7de instanceof RegExp) {
_7e0[key] = _7de;
}
}
}
for (i = 0; i < _7db.length; ++i) {
var _7e1 = true;
var _7e2 = _7db[i];
if (_7e2 === null) {
_7e1 = false;
} else {
for (key in _7da.query) {
_7de = _7da.query[key];
if (!this._containsValue(_7e2, key, _7de, _7e0[key])) {
_7e1 = false;
}
}
}
if (_7e1) {
_7dd.push(_7e2);
}
}
_7dc(_7dd, _7da);
} else {
for (i = 0; i < _7db.length; ++i) {
var item = _7db[i];
if (item !== null) {
_7dd.push(item);
}
}
_7dc(_7dd, _7da);
}
},_fetchItems: function(_7e3, _7e4, _7e5) {
var self = this;
if (this._loadFinished) {
this.filter(_7e3, this._getItemsArray(_7e3.queryOptions), _7e4);
} else {
if (this._jsonFileUrl !== this._ccUrl) {
_7bf.deprecated(this.declaredClass + ": ", "To change the url, set the url property of the store," + " not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this._ccUrl = this._jsonFileUrl;
this.url = this._jsonFileUrl;
} else {
if (this.url !== this._ccUrl) {
this._jsonFileUrl = this.url;
this._ccUrl = this.url;
}
}
if (this.data != null) {
this._jsonData = this.data;
this.data = null;
}
if (this._jsonFileUrl) {
if (this._loadInProgress) {
this._queuedFetches.push({args: _7e3,filter: lang.hitch(self, "filter"),findCallback: lang.hitch(self, _7e4)});
} else {
this._loadInProgress = true;
var _7e6 = {url: self._jsonFileUrl,handleAs: "json-comment-optional",preventCache: this.urlPreventCache,failOk: this.failOk};
var _7e7 = xhr.get(_7e6);
_7e7.addCallback(function(data) {
try {
self._getItemsFromLoadedData(data);
self._loadFinished = true;
self._loadInProgress = false;
self.filter(_7e3, self._getItemsArray(_7e3.queryOptions), _7e4);
self._handleQueuedFetches();
} catch (e) {
self._loadFinished = true;
self._loadInProgress = false;
_7e5(e, _7e3);
}
});
_7e7.addErrback(function(_7e8) {
self._loadInProgress = false;
_7e5(_7e8, _7e3);
});
var _7e9 = null;
if (_7e3.abort) {
_7e9 = _7e3.abort;
}
_7e3.abort = function() {
var df = _7e7;
if (df && df.fired === -1) {
df.cancel();
df = null;
}
if (_7e9) {
_7e9.call(_7e3);
}
};
}
} else {
if (this._jsonData) {
try {
this._loadFinished = true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData = null;
self.filter(_7e3, this._getItemsArray(_7e3.queryOptions), _7e4);
} catch (e) {
_7e5(e, _7e3);
}
} else {
_7e5(new Error(this.declaredClass + ": No JSON source data was provided as either URL or a nested Javascript object."), _7e3);
}
}
}
},_handleQueuedFetches: function() {
if (this._queuedFetches.length > 0) {
for (var i = 0; i < this._queuedFetches.length; i++) {
var _7ea = this._queuedFetches[i], _7eb = _7ea.args, _7ec = _7ea.filter, _7ed = _7ea.findCallback;
if (_7ec) {
_7ec(_7eb, this._getItemsArray(_7eb.queryOptions), _7ed);
} else {
this.fetchItemByIdentity(_7eb);
}
}
this._queuedFetches = [];
}
},_getItemsArray: function(_7ee) {
if (_7ee && _7ee.deep) {
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close: function(_7ef) {
if (this.clearOnClose && this._loadFinished && !this._loadInProgress) {
if (((this._jsonFileUrl == "" || this._jsonFileUrl == null) && (this.url == "" || this.url == null)) && this.data == null) {
}
this._arrayOfAllItems = [];
this._arrayOfTopLevelItems = [];
this._loadFinished = false;
this._itemsByIdentity = null;
this._loadInProgress = false;
this._queuedFetches = [];
}
},_getItemsFromLoadedData: function(_7f0) {
var _7f1 = false, self = this;
function _7f2(_7f3) {
return (_7f3 !== null) && (typeof _7f3 === "object") && (!lang.isArray(_7f3) || _7f1) && (!lang.isFunction(_7f3)) && (_7f3.constructor == Object || lang.isArray(_7f3)) && (typeof _7f3._reference === "undefined") && (typeof _7f3._type === "undefined") && (typeof _7f3._value === "undefined") && self.hierarchical;
}
;
function _7f4(_7f5) {
self._arrayOfAllItems.push(_7f5);
for (var _7f6 in _7f5) {
var _7f7 = _7f5[_7f6];
if (_7f7) {
if (lang.isArray(_7f7)) {
var _7f8 = _7f7;
for (var k = 0; k < _7f8.length; ++k) {
var _7f9 = _7f8[k];
if (_7f2(_7f9)) {
_7f4(_7f9);
}
}
} else {
if (_7f2(_7f7)) {
_7f4(_7f7);
}
}
}
}
}
;
this._labelAttr = _7f0.label;
var i, item;
this._arrayOfAllItems = [];
this._arrayOfTopLevelItems = _7f0.items;
for (i = 0; i < this._arrayOfTopLevelItems.length; ++i) {
item = this._arrayOfTopLevelItems[i];
if (lang.isArray(item)) {
_7f1 = true;
}
_7f4(item);
item[this._rootItemPropName] = true;
}
var _7fa = {}, key;
for (i = 0; i < this._arrayOfAllItems.length; ++i) {
item = this._arrayOfAllItems[i];
for (key in item) {
if (key !== this._rootItemPropName) {
var _7fb = item[key];
if (_7fb !== null) {
if (!lang.isArray(_7fb)) {
item[key] = [_7fb];
}
} else {
item[key] = [null];
}
}
_7fa[key] = key;
}
}
while (_7fa[this._storeRefPropName]) {
this._storeRefPropName += "_";
}
while (_7fa[this._itemNumPropName]) {
this._itemNumPropName += "_";
}
while (_7fa[this._reverseRefMap]) {
this._reverseRefMap += "_";
}
var _7fc;
var _7fd = _7f0.identifier;
if (_7fd) {
this._itemsByIdentity = {};
this._features["dojo.data.api.Identity"] = _7fd;
for (i = 0; i < this._arrayOfAllItems.length; ++i) {
item = this._arrayOfAllItems[i];
_7fc = item[_7fd];
var _7fe = _7fc[0];
if (!Object.hasOwnProperty.call(this._itemsByIdentity, _7fe)) {
this._itemsByIdentity[_7fe] = item;
} else {
if (this._jsonFileUrl) {
throw new Error(this.declaredClass + ":  The json data as specified by: [" + this._jsonFileUrl + "] is malformed.  Items within the list have identifier: [" + _7fd + "].  Value collided: [" + _7fe + "]");
} else {
if (this._jsonData) {
throw new Error(this.declaredClass + ":  The json data provided by the creation arguments is malformed.  Items within the list have identifier: [" + _7fd + "].  Value collided: [" + _7fe + "]");
}
}
}
}
} else {
this._features["dojo.data.api.Identity"] = Number;
}
for (i = 0; i < this._arrayOfAllItems.length; ++i) {
item = this._arrayOfAllItems[i];
item[this._storeRefPropName] = this;
item[this._itemNumPropName] = i;
}
for (i = 0; i < this._arrayOfAllItems.length; ++i) {
item = this._arrayOfAllItems[i];
for (key in item) {
_7fc = item[key];
for (var j = 0; j < _7fc.length; ++j) {
_7fb = _7fc[j];
if (_7fb !== null && typeof _7fb == "object") {
if (("_type" in _7fb) && ("_value" in _7fb)) {
var type = _7fb._type;
var _7ff = this._datatypeMap[type];
if (!_7ff) {
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '" + type + "'");
} else {
if (lang.isFunction(_7ff)) {
_7fc[j] = new _7ff(_7fb._value);
} else {
if (lang.isFunction(_7ff.deserialize)) {
_7fc[j] = _7ff.deserialize(_7fb._value);
} else {
throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
}
}
}
}
if (_7fb._reference) {
var _800 = _7fb._reference;
if (!lang.isObject(_800)) {
_7fc[j] = this._getItemByIdentity(_800);
} else {
for (var k = 0; k < this._arrayOfAllItems.length; ++k) {
var _801 = this._arrayOfAllItems[k], _802 = true;
for (var _803 in _800) {
if (_801[_803] != _800[_803]) {
_802 = false;
}
}
if (_802) {
_7fc[j] = _801;
}
}
}
if (this.referenceIntegrity) {
var _804 = _7fc[j];
if (this.isItem(_804)) {
this._addReferenceToMap(_804, item, key);
}
}
} else {
if (this.isItem(_7fb)) {
if (this.referenceIntegrity) {
this._addReferenceToMap(_7fb, item, key);
}
}
}
}
}
}
}
},_addReferenceToMap: function(_805, _806, _807) {
},getIdentity: function(item) {
var _808 = this._features["dojo.data.api.Identity"];
if (_808 === Number) {
return item[this._itemNumPropName];
} else {
var _809 = item[_808];
if (_809) {
return _809[0];
}
}
return null;
},fetchItemByIdentity: function(_80a) {
var item, _80b;
if (!this._loadFinished) {
var self = this;
if (this._jsonFileUrl !== this._ccUrl) {
_7bf.deprecated(this.declaredClass + ": ", "To change the url, set the url property of the store," + " not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this._ccUrl = this._jsonFileUrl;
this.url = this._jsonFileUrl;
} else {
if (this.url !== this._ccUrl) {
this._jsonFileUrl = this.url;
this._ccUrl = this.url;
}
}
if (this.data != null && this._jsonData == null) {
this._jsonData = this.data;
this.data = null;
}
if (this._jsonFileUrl) {
if (this._loadInProgress) {
this._queuedFetches.push({args: _80a});
} else {
this._loadInProgress = true;
var _80c = {url: self._jsonFileUrl,handleAs: "json-comment-optional",preventCache: this.urlPreventCache,failOk: this.failOk};
var _80d = xhr.get(_80c);
_80d.addCallback(function(data) {
var _80e = _80a.scope ? _80a.scope : _7bf.global;
try {
self._getItemsFromLoadedData(data);
self._loadFinished = true;
self._loadInProgress = false;
item = self._getItemByIdentity(_80a.identity);
if (_80a.onItem) {
_80a.onItem.call(_80e, item);
}
self._handleQueuedFetches();
} catch (error) {
self._loadInProgress = false;
if (_80a.onError) {
_80a.onError.call(_80e, error);
}
}
});
_80d.addErrback(function(_80f) {
self._loadInProgress = false;
if (_80a.onError) {
var _810 = _80a.scope ? _80a.scope : _7bf.global;
_80a.onError.call(_810, _80f);
}
});
}
} else {
if (this._jsonData) {
self._getItemsFromLoadedData(self._jsonData);
self._jsonData = null;
self._loadFinished = true;
item = self._getItemByIdentity(_80a.identity);
if (_80a.onItem) {
_80b = _80a.scope ? _80a.scope : _7bf.global;
_80a.onItem.call(_80b, item);
}
}
}
} else {
item = this._getItemByIdentity(_80a.identity);
if (_80a.onItem) {
_80b = _80a.scope ? _80a.scope : _7bf.global;
_80a.onItem.call(_80b, item);
}
}
},_getItemByIdentity: function(_811) {
var item = null;
if (this._itemsByIdentity) {
if (Object.hasOwnProperty.call(this._itemsByIdentity, _811)) {
item = this._itemsByIdentity[_811];
}
} else {
if (Object.hasOwnProperty.call(this._arrayOfAllItems, _811)) {
item = this._arrayOfAllItems[_811];
}
}
if (item === undefined) {
item = null;
}
return item;
},getIdentityAttributes: function(item) {
var _812 = this._features["dojo.data.api.Identity"];
if (_812 === Number) {
return null;
} else {
return [_812];
}
},_forceLoad: function() {
var self = this;
if (this._jsonFileUrl !== this._ccUrl) {
_7bf.deprecated(this.declaredClass + ": ", "To change the url, set the url property of the store," + " not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this._ccUrl = this._jsonFileUrl;
this.url = this._jsonFileUrl;
} else {
if (this.url !== this._ccUrl) {
this._jsonFileUrl = this.url;
this._ccUrl = this.url;
}
}
if (this.data != null) {
this._jsonData = this.data;
this.data = null;
}
if (this._jsonFileUrl) {
var _813 = {url: this._jsonFileUrl,handleAs: "json-comment-optional",preventCache: this.urlPreventCache,failOk: this.failOk,sync: true};
var _814 = xhr.get(_813);
_814.addCallback(function(data) {
try {
if (self._loadInProgress !== true && !self._loadFinished) {
self._getItemsFromLoadedData(data);
self._loadFinished = true;
} else {
if (self._loadInProgress) {
throw new Error(this.declaredClass + ":  Unable to perform a synchronous load, an async load is in progress.");
}
}
} catch (e) {
throw e;
}
});
_814.addErrback(function(_815) {
throw _815;
});
} else {
if (this._jsonData) {
self._getItemsFromLoadedData(self._jsonData);
self._jsonData = null;
self._loadFinished = true;
}
}
}});
lang.extend(_7c6, _7c4);
return _7c6;
});
},"dojo/data/util/filter": function() {
define(["../../_base/lang"], function(lang) {
var _816 = {};
lang.setObject("dojo.data.util.filter", _816);
_816.patternToRegExp = function(_817, _818) {
var rxp = "^";
var c = null;
for (var i = 0; i < _817.length; i++) {
c = _817.charAt(i);
switch (c) {
case "\\":
rxp += c;
i++;
rxp += _817.charAt(i);
break;
case "*":
rxp += ".*";
break;
case "?":
rxp += ".";
break;
case "$":
case "^":
case "/":
case "+":
case ".":
case "|":
case "(":
case ")":
case "{":
case "}":
case "[":
case "]":
rxp += "\\";
default:
rxp += c;
}
}
rxp += "$";
if (_818) {
return new RegExp(rxp, "mi");
} else {
return new RegExp(rxp, "m");
}
};
return _816;
});
},"dojo/data/util/simpleFetch": function() {
define(["../../_base/lang", "../../_base/kernel", "./sorter"], function(lang, _819, _81a) {
var _81b = {};
lang.setObject("dojo.data.util.simpleFetch", _81b);
_81b.errorHandler = function(_81c, _81d) {
if (_81d.onError) {
var _81e = _81d.scope || _819.global;
_81d.onError.call(_81e, _81c, _81d);
}
};
_81b.fetchHandler = function(_81f, _820) {
var _821 = _820.abort || null, _822 = false, _823 = _820.start ? _820.start : 0, _824 = (_820.count && (_820.count !== Infinity)) ? (_823 + _820.count) : _81f.length;
_820.abort = function() {
_822 = true;
if (_821) {
_821.call(_820);
}
};
var _825 = _820.scope || _819.global;
if (!_820.store) {
_820.store = this;
}
if (_820.onBegin) {
_820.onBegin.call(_825, _81f.length, _820);
}
if (_820.sort) {
_81f.sort(_81a.createSortFunction(_820.sort, this));
}
if (_820.onItem) {
for (var i = _823; (i < _81f.length) && (i < _824); ++i) {
var item = _81f[i];
if (!_822) {
_820.onItem.call(_825, item, _820);
}
}
}
if (_820.onComplete && !_822) {
var _826 = null;
if (!_820.onItem) {
_826 = _81f.slice(_823, _824);
}
_820.onComplete.call(_825, _826, _820);
}
};
_81b.fetch = function(_827) {
_827 = _827 || {};
if (!_827.store) {
_827.store = this;
}
this._fetchItems(_827, lang.hitch(this, "fetchHandler"), lang.hitch(this, "errorHandler"));
return _827;
};
return _81b;
});
},"dojo/data/util/sorter": function() {
define(["../../_base/lang"], function(lang) {
var _828 = {};
lang.setObject("dojo.data.util.sorter", _828);
_828.basicComparator = function(a, b) {
var r = -1;
if (a === null) {
a = undefined;
}
if (b === null) {
b = undefined;
}
if (a == b) {
r = 0;
} else {
if (a > b || a == null) {
r = 1;
}
}
return r;
};
_828.createSortFunction = function(_829, _82a) {
var _82b = [];
function _82c(attr, dir, comp, s) {
return function(_82d, _82e) {
var a = s.getValue(_82d, attr);
var b = s.getValue(_82e, attr);
return dir * comp(a, b);
};
}
;
var _82f;
var map = _82a.comparatorMap;
var bc = _828.basicComparator;
for (var i = 0; i < _829.length; i++) {
_82f = _829[i];
var attr = _82f.attribute;
if (attr) {
var dir = (_82f.descending) ? -1 : 1;
var comp = bc;
if (map) {
if (typeof attr !== "string" && ("toString" in attr)) {
attr = attr.toString();
}
comp = map[attr] || bc;
}
_82b.push(_82c(attr, dir, comp, _82a));
}
}
return function(rowA, rowB) {
var i = 0;
while (i < _82b.length) {
var ret = _82b[i++](rowA, rowB);
if (ret !== 0) {
return ret;
}
}
return 0;
};
};
return _828;
});
},"dojo/store/DataStore": function() {
define(["../_base/lang", "../_base/declare", "../_base/Deferred", "../_base/array", "./util/QueryResults", "./util/SimpleQueryEngine"], function(lang, _830, _831, _832, _833, _834) {
var base = null;
return _830("dojo.store.DataStore", base, {target: "",constructor: function(_835) {
lang.mixin(this, _835);
if (!"idProperty" in _835) {
var _836;
try {
_836 = this.store.getIdentityAttributes();
} catch (e) {
}
this.idProperty = (!_836 || !idAttributes[0]) || this.idProperty;
}
var _837 = this.store.getFeatures();
if (!_837["dojo.data.api.Read"]) {
this.get = null;
}
if (!_837["dojo.data.api.Identity"]) {
this.getIdentity = null;
}
if (!_837["dojo.data.api.Write"]) {
this.put = this.add = null;
}
},idProperty: "id",store: null,queryEngine: _834,_objectConverter: function(_838) {
var _839 = this.store;
var _83a = this.idProperty;
function _83b(item) {
var _83c = {};
var _83d = _839.getAttributes(item);
for (var i = 0; i < _83d.length; i++) {
var _83e = _83d[i];
var _83f = _839.getValues(item, _83e);
if (_83f.length > 1) {
for (var j = 0; j < _83f.length; j++) {
var _840 = _83f[j];
if (typeof _840 == "object" && _839.isItem(_840)) {
_83f[j] = _83b(_840);
}
}
_840 = _83f;
} else {
var _840 = _839.getValue(item, _83e);
if (typeof _840 == "object" && _839.isItem(_840)) {
_840 = _83b(_840);
}
}
_83c[_83d[i]] = _840;
}
if (!(_83a in _83c) && _839.getIdentity) {
_83c[_83a] = _839.getIdentity(item);
}
return _83c;
}
;
return function(item) {
return _838(_83b(item));
};
},get: function(id, _841) {
var _842, _843;
var _844 = new _831();
this.store.fetchItemByIdentity({identity: id,onItem: this._objectConverter(function(_845) {
_844.resolve(_842 = _845);
}),onError: function(_846) {
_844.reject(_843 = _846);
}});
if (_842) {
return _842;
}
if (_843) {
throw _843;
}
return _844.promise;
},put: function(_847, _848) {
var id = _848 && typeof _848.id != "undefined" || this.getIdentity(_847);
var _849 = this.store;
var _84a = this.idProperty;
if (typeof id == "undefined") {
_849.newItem(_847);
_849.save();
} else {
_849.fetchItemByIdentity({identity: id,onItem: function(item) {
if (item) {
for (var i in _847) {
if (i != _84a && _849.getValue(item, i) != _847[i]) {
_849.setValue(item, i, _847[i]);
}
}
} else {
_849.newItem(_847);
}
_849.save();
}});
}
},remove: function(id) {
var _84b = this.store;
this.store.fetchItemByIdentity({identity: id,onItem: function(item) {
_84b.deleteItem(item);
_84b.save();
}});
},query: function(_84c, _84d) {
var _84e;
var _84f = new _831(function() {
_84e.abort && _84e.abort();
});
_84f.total = new _831();
var _850 = this._objectConverter(function(_851) {
return _851;
});
_84e = this.store.fetch(lang.mixin({query: _84c,onBegin: function(_852) {
_84f.total.resolve(_852);
},onComplete: function(_853) {
_84f.resolve(_832.map(_853, _850));
},onError: function(_854) {
_84f.reject(_854);
}}, _84d));
return _833(_84f);
},getIdentity: function(_855) {
return _855[this.idProperty];
}});
});
},"dojox/app/utils/mvcModel": function() {
define("dojox/app/utils/mvcModel", ["dojo/_base/lang", "dojo/Deferred", "dojo/when", "dojo/_base/config", "dojo/store/DataStore", "dojox/mvc/getStateful", "dojo/has"], function(lang, _856, when, _857, _858, _859, has) {
return function(_85a, _85b, item) {
var _85c = {};
var _85d = new _856();
var _85e = function(_85f) {
var ops = {};
for (var item in _85f) {
if (item.charAt(0) !== "_") {
ops[item] = _85f[item];
}
}
return (ops);
};
var _860;
if (_85b.store) {
_860 = {"store": _85b.store.store,"query": _85b.query ? _85e(_85b.query) : _85b.store.query ? _85e(_85b.store.query) : {}};
} else {
if (_85b.datastore) {
_860 = {"store": new _858({store: _85b.datastore.store}),"query": _85e(_85b.query)};
} else {
if (_85b.data) {
if (_85b.data && lang.isString(_85b.data)) {
_85b.data = lang.getObject(_85b.data);
}
_860 = {"data": _85b.data,query: {}};
}
}
}
var _861 = null;
var type = _85a[item].type ? _85a[item].type : "dojox/mvc/EditStoreRefListController";
var def = new _856();
require([type], function(_862) {
def.resolve(_862);
});
when(def, function(_863) {
_861 = new _863(_860);
var _864;
try {
if (_861.queryStore) {
_864 = _861.queryStore(_860.query);
} else {
var _865 = _861._refSourceModelProp || _861._refModelProp || "model";
_861.set(_865, _859(_860.data));
_864 = _861;
}
} catch (ex) {
_85d.reject("load mvc model error.");
return _85d.promise;
}
if (_864.then) {
when(_864, lang.hitch(this, function() {
_85c = _861;
_85d.resolve(_85c);
return _85c;
}), function() {
loadModelLoaderDeferred.reject("load model error.");
});
} else {
_85c = _861;
_85d.resolve(_85c);
return _85c;
}
});
return _85d;
};
});
},"dojox/mvc/getStateful": function() {
define("dojox/mvc/getStateful", ["dojo/_base/array", "dojo/_base/lang", "dojo/Stateful", "./StatefulArray"], function(_866, lang, _867, _868) {
var _869 = {getType: function(v) {
return lang.isArray(v) ? "array" : v != null && {}.toString.call(v) == "[object Object]" ? "object" : "value";
},getStatefulArray: function(a) {
return new _868(_866.map(a, function(item) {
return _86a(item, this);
}, this));
},getStatefulObject: function(o) {
var _86b = new _867();
for (var s in o) {
_86b[s] = _86a(o[s], this);
}
return _86b;
},getStatefulValue: function(v) {
return v;
}};
var _86a = function(_86c, _86d) {
return (_86d || _86a)["getStateful" + (_86d || _86a).getType(_86c).replace(/^[a-z]/, function(c) {
return c.toUpperCase();
})](_86c);
};
return lang.setObject("dojox.mvc.getStateful", lang.mixin(_86a, _869));
});
},"dojox/mvc/StatefulArray": function() {
define("dojox/mvc/StatefulArray", ["dojo/_base/lang", "dojo/Stateful"], function(lang, _86e) {
function _86f(a) {
if (a._watchElementCallbacks) {
a._watchElementCallbacks();
}
return a;
}
;
var _870 = function(a) {
var _871 = lang._toArray(a);
var ctor = _870;
ctor._meta = {bases: [_86e]};
_871.constructor = ctor;
return lang.mixin(_871, {pop: function() {
return this.splice(this.get("length") - 1, 1)[0];
},push: function() {
this.splice.apply(this, [this.get("length"), 0].concat(lang._toArray(arguments)));
return this.get("length");
},reverse: function() {
return _86f([].reverse.apply(this, lang._toArray(arguments)));
},shift: function() {
return this.splice(0, 1)[0];
},sort: function() {
return _86f([].sort.apply(this, lang._toArray(arguments)));
},splice: function(idx, n) {
var l = this.get("length");
idx += idx < 0 ? l : 0;
var p = Math.min(idx, l), _872 = this.slice(idx, idx + n), adds = lang._toArray(arguments).slice(2);
[].splice.apply(this, [idx, n].concat(new Array(adds.length)));
for (var i = 0; i < adds.length; i++) {
this.set(p + i, adds[i]);
}
if (this._watchElementCallbacks) {
this._watchElementCallbacks(idx, _872, adds);
}
if (this._watchCallbacks) {
this._watchCallbacks("length", l, l - _872.length + adds.length);
}
return _872;
},unshift: function() {
this.splice.apply(this, [0, 0].concat(lang._toArray(arguments)));
return this.get("length");
},concat: function(a) {
return new _870([].concat(this).concat(a));
},join: function(sep) {
var list = [];
for (var l = this.get("length"), i = 0; i < l; i++) {
list.push(this.get(i));
}
return list.join(sep);
},slice: function(_873, end) {
var l = this.get("length");
_873 += _873 < 0 ? l : 0;
end = (end === void 0 ? l : end) + (end < 0 ? l : 0);
var _874 = [];
for (var i = _873 || 0; i < Math.min(end, this.get("length")); i++) {
_874.push(this.get(i));
}
return new _870(_874);
},watchElements: function(_875) {
var _876 = this._watchElementCallbacks, _877 = this;
if (!_876) {
_876 = this._watchElementCallbacks = function(idx, _878, adds) {
for (var list = [].concat(_876.list), i = 0; i < list.length; i++) {
list[i].call(_877, idx, _878, adds);
}
};
_876.list = [];
}
_876.list.push(_875);
var h = {};
h.unwatch = h.remove = function() {
for (var list = _876.list, i = 0; i < list.length; i++) {
if (list[i] == _875) {
list.splice(i, 1);
break;
}
}
};
return h;
}}, _86e.prototype, {set: function(name, _879) {
if (name == "length") {
var old = this.get("length");
if (old < _879) {
this.splice.apply(this, [old, 0].concat(new Array(_879 - old)));
} else {
if (_879 > old) {
this.splice.apply(this, [_879, old - _879]);
}
}
return this;
} else {
var _87a = this.length;
_86e.prototype.set.call(this, name, _879);
if (_87a != this.length) {
_86e.prototype.set.call(this, "length", this.length);
}
return this;
}
}});
};
return lang.setObject("dojox.mvc.StatefulArray", _870);
});
},"dojox/mvc/EditStoreRefListController": function() {
define("dojox/mvc/EditStoreRefListController", ["dojo/_base/declare", "dojo/_base/lang", "./getPlainValue", "./EditStoreRefController", "./ListController"], function(_87b, lang, _87c, _87d, _87e) {
return _87b("dojox.mvc.EditStoreRefListController", [_87d, _87e], {commitCurrent: function() {
var id = this.cursor[this.idProperty];
for (var i = 0; i < this.originalModel.length; i++) {
if (this.originalModel[i][this.idProperty] == id) {
this.originalModel.set(i, this.cloneModel(this.cursor));
break;
}
}
this.store.put(this.cursor);
}});
});
},"dojox/mvc/getPlainValue": function() {
define("dojox/mvc/getPlainValue", ["dojo/_base/array", "dojo/_base/lang", "dojo/Stateful"], function(_87f, lang, _880) {
var _881 = {getType: function(v) {
return lang.isArray(v) ? "array" : v != null && {}.toString.call(v) == "[object Object]" ? "object" : "value";
},getPlainArray: function(a) {
return _87f.map(a, function(item) {
return _882(item, this);
}, this);
},getPlainObject: function(o) {
var _883 = {};
for (var s in o) {
if (!(s in _880.prototype) && s != "_watchCallbacks") {
_883[s] = _882(o[s], this);
}
}
return _883;
},getPlainValue: function(v) {
return v;
}};
var _882 = function(_884, _885) {
return (_885 || _882)["getPlain" + (_885 || _882).getType(_884).replace(/^[a-z]/, function(c) {
return c.toUpperCase();
})](_884);
};
return lang.setObject("dojox.mvc.getPlainValue", lang.mixin(_882, _881));
});
},"dojox/mvc/EditStoreRefController": function() {
define("dojox/mvc/EditStoreRefController", ["dojo/_base/declare", "dojo/_base/lang", "dojo/when", "./getPlainValue", "./EditModelRefController", "./StoreRefController"], function(_886, lang, when, _887, _888, _889) {
return _886("dojox.mvc.EditStoreRefController", [_889, _888], {getPlainValueOptions: null,_removals: [],_resultsWatchHandle: null,_refSourceModelProp: "sourceModel",queryStore: function(_88a, _88b) {
if (!(this.store || {}).query) {
return;
}
if (this._resultsWatchHandle) {
this._resultsWatchHandle.unwatch();
}
this._removals = [];
var _88c = this;
return when(this.inherited(arguments), function(_88d) {
if (_88c._beingDestroyed) {
return;
}
if (lang.isArray(_88d)) {
_88c._resultsWatchHandle = _88d.watchElements(function(idx, _88e, adds) {
[].push.apply(_88c._removals, _88e);
});
}
return _88d;
});
},getStore: function(id, _88f) {
if (this._resultsWatchHandle) {
this._resultsWatchHandle.unwatch();
}
return this.inherited(arguments);
},commit: function() {
if (this._removals) {
for (var i = 0; i < this._removals.length; i++) {
this.store.remove(this.store.getIdentity(this._removals[i]));
}
this._removals = [];
}
var data = _887(this.get(this._refEditModelProp), this.getPlainValueOptions);
if (lang.isArray(data)) {
for (var i = 0; i < data.length; i++) {
this.store.put(data[i]);
}
} else {
this.store.put(data);
}
this.inherited(arguments);
},reset: function() {
this.inherited(arguments);
this._removals = [];
},destroy: function() {
if (this._resultsWatchHandle) {
this._resultsWatchHandle.unwatch();
}
this.inherited(arguments);
}});
});
},"dojox/mvc/EditModelRefController": function() {
define("dojox/mvc/EditModelRefController", ["dojo/_base/declare", "dojo/_base/lang", "./getPlainValue", "./getStateful", "./ModelRefController"], function(_890, lang, _891, _892, _893) {
function _894(ctrl, old, _895) {
if (old !== _895) {
ctrl.set(ctrl._refOriginalModelProp, ctrl.holdModelUntilCommit ? _895 : ctrl.cloneModel(_895));
ctrl.set(ctrl._refEditModelProp, ctrl.holdModelUntilCommit ? ctrl.cloneModel(_895) : _895);
}
}
;
return _890("dojox.mvc.EditModelRefController", _893, {getStatefulOptions: null,getPlainValueOptions: null,holdModelUntilCommit: false,originalModel: null,sourceModel: null,_refOriginalModelProp: "originalModel",_refSourceModelProp: "sourceModel",_refEditModelProp: "model",postscript: function(_896, _897) {
for (var s in {getStatefulOptions: 1,getPlainValueOptions: 1,holdModelUntilCommit: 1}) {
var _898 = (_896 || {})[s];
if (typeof _898 != "undefined") {
this[s] = _898;
}
}
this.inherited(arguments);
},set: function(name, _899) {
if (name == this._refSourceModelProp) {
_894(this, this[this._refSourceModelProp], _899);
}
this.inherited(arguments);
},cloneModel: function(_89a) {
var _89b = lang.isFunction((_89a || {}).set) && lang.isFunction((_89a || {}).watch) ? _891(_89a, this.getPlainValueOptions) : _89a;
return _892(_89b, this.getStatefulOptions);
},commit: function() {
this.set(this.holdModelUntilCommit ? this._refSourceModelProp : this._refOriginalModelProp, this.cloneModel(this.get(this._refEditModelProp)));
},reset: function() {
this.set(this.holdModelUntilCommit ? this._refEditModelProp : this._refSourceModelProp, this.cloneModel(this.get(this._refOriginalModelProp)));
},hasControllerProperty: function(name) {
return this.inherited(arguments) || name == this._refOriginalModelProp || name == this._refSourceModelProp;
}});
});
},"dojox/mvc/ModelRefController": function() {
define("dojox/mvc/ModelRefController", ["dojo/_base/array", "dojo/_base/declare", "dojo/_base/lang", "dojo/Stateful", "./_Controller"], function(_89c, _89d, lang, _89e, _89f) {
return _89d("dojox.mvc.ModelRefController", _89f, {ownProps: null,_refModelProp: "model",_refInModelProp: "model",model: null,postscript: function(_8a0, _8a1) {
this._relTargetProp = (_8a0 || {})._refModelProp || this._refModelProp;
this.inherited(arguments);
},get: function(name) {
if (!this.hasControllerProperty(name)) {
var _8a2 = this[this._refModelProp];
return !_8a2 ? void 0 : _8a2.get ? _8a2.get(name) : _8a2[name];
}
return this.inherited(arguments);
},_set: function(name, _8a3) {
if (!this.hasControllerProperty(name)) {
var _8a4 = this[this._refModelProp];
_8a4 && (_8a4.set ? _8a4.set(name, _8a3) : (_8a4[name] = _8a3));
return this;
}
return this.inherited(arguments);
},watch: function(name, _8a5) {
if (this.hasControllerProperty(name)) {
return this.inherited(arguments);
}
if (!_8a5) {
_8a5 = name;
name = null;
}
var hm = null, hp = null, _8a6 = this;
function _8a7(_8a8) {
if (hp) {
hp.unwatch();
}
if (_8a8 && lang.isFunction(_8a8.set) && lang.isFunction(_8a8.watch)) {
hp = _8a8.watch.apply(_8a8, (name ? [name] : []).concat([function(name, old, _8a9) {
_8a5.call(_8a6, name, old, _8a9);
}]));
}
}
;
function _8aa(old, _8ab) {
var _8ac = {};
if (!name) {
_89c.forEach([old, _8ab], function(_8ad) {
var list = _8ad && _8ad.get("properties");
if (list) {
_89c.forEach(list, function(item) {
if (!_8a6.hasControllerProperty(item)) {
_8ac[item] = 1;
}
});
} else {
for (var s in _8ad) {
if (_8ad.hasOwnProperty(s) && !_8a6.hasControllerProperty(s)) {
_8ac[s] = 1;
}
}
}
});
} else {
_8ac[name] = 1;
}
for (var s in _8ac) {
_8a5.call(_8a6, s, !old ? void 0 : old.get ? old.get(s) : old[s], !_8ab ? void 0 : _8ab.get ? _8ab.get(s) : _8ab[s]);
}
}
;
hm = _89e.prototype.watch.call(this, this._refModelProp, function(name, old, _8ae) {
if (old === _8ae) {
return;
}
_8aa(old, _8ae);
_8a7(_8ae);
});
_8a7(this.get(this._refModelProp));
var h = {};
h.unwatch = h.remove = function() {
if (hp) {
hp.unwatch();
hp = null;
}
if (hm) {
hm.unwatch();
hm = null;
}
};
return h;
},hasControllerProperty: function(name) {
return name == "_watchCallbacks" || name == this._refModelProp || name == this._refInModelProp || (name in (this.ownProps || {})) || (name in this.constructor.prototype) || /^dojoAttach(Point|Event)$/i.test(name);
}});
});
},"dojox/mvc/_Controller": function() {
define("dojox/mvc/_Controller", ["dojo/_base/declare", "dojo/_base/lang", "dojo/Stateful", "./_atBindingMixin"], function(_8af, lang, _8b0, _8b1) {
return _8af("dojox.mvc._Controller", [_8b0, _8b1], {postscript: function(_8b2, _8b3) {
if (this._applyAttributes) {
this.inherited(arguments);
}
this._dbpostscript(_8b2, _8b3);
if (_8b2) {
this.params = _8b2;
for (var s in _8b2) {
this.set(s, _8b2[s]);
}
}
var _8b4;
try {
_8b4 = require("dijit/registry");
this.id = this.id || (_8b3 || {}).id || _8b4.getUniqueId(this.declaredClass.replace(/\./g, "_"));
_8b4.add(this);
} catch (e) {
}
if (!_8b3) {
this.startup();
} else {
_8b3.setAttribute("widgetId", this.id);
}
},startup: function() {
if (!this._applyAttributes) {
this._startAtWatchHandles();
}
this.inherited(arguments);
},destroy: function() {
this._beingDestroyed = true;
if (!this._applyAttributes) {
this._stopAtWatchHandles();
}
this.inherited(arguments);
if (!this._applyAttributes) {
try {
require("dijit/registry").remove(this.id);
} catch (e) {
}
}
this._destroyed = true;
},set: function(name, _8b5) {
if (typeof name === "object") {
for (var x in name) {
if (name.hasOwnProperty(x)) {
this.set(x, name[x]);
}
}
return this;
}
if (!this._applyAttributes) {
if ((_8b5 || {}).atsignature == "dojox.mvc.at") {
return this._setAtWatchHandle(name, _8b5);
} else {
var _8b6 = "_set" + name.replace(/^[a-z]/, function(c) {
return c.toUpperCase();
}) + "Attr";
if (this[_8b6]) {
this[_8b6](_8b5);
} else {
this._set(name, _8b5);
}
return this;
}
}
return this.inherited(arguments);
},_set: function(name, _8b7) {
if (!this._applyAttributes) {
return this._changeAttrValue(name, _8b7);
}
return this.inherited(arguments);
}});
});
},"dojox/mvc/_atBindingMixin": function() {
define("dojox/mvc/_atBindingMixin", ["dojo/_base/array", "dojo/_base/lang", "dojo/_base/declare", "dojo/has", "./resolve", "./sync"], function(_8b8, lang, _8b9, has, _8ba, sync) {
if (has("mvc-bindings-log-api")) {
function _8bb(_8bc, _8bd) {
return [_8bc._setIdAttr || !_8bc.declaredClass ? _8bc : _8bc.declaredClass, _8bd].join(":");
}
;
function _8be(_8bf, _8c0) {
console.warn(_8c0 + " could not be resolved" + (typeof _8bf == "string" ? (" with " + _8bf) : "") + ".");
}
;
}
function _8c1(w) {
var _8c2;
try {
_8c2 = require("dijit/registry");
} catch (e) {
return;
}
var pn = w.domNode && w.domNode.parentNode, pw, pb;
while (pn) {
pw = _8c2.getEnclosingWidget(pn);
if (pw) {
var _8c3 = pw._relTargetProp || "target", pt = lang.isFunction(pw.get) ? pw.get(_8c3) : pw[_8c3];
if (pt || _8c3 in pw.constructor.prototype) {
return pw;
}
}
pn = pw && pw.domNode.parentNode;
}
}
;
function bind(_8c4, _8c5, _8c6, _8c7, _8c8) {
var _8c9 = {}, _8ca = _8c1(_8c6), _8cb = _8ca && _8ca._relTargetProp || "target";
function _8cc() {
_8c9["Two"] && _8c9["Two"].unwatch();
delete _8c9["Two"];
var _8cd = _8ca && (lang.isFunction(_8ca.get) ? _8ca.get(_8cb) : _8ca[_8cb]), _8ce = _8ba(_8c4, _8cd), _8cf = _8ba(_8c6, _8cd);
if (has("mvc-bindings-log-api") && (!_8ce || /^rel:/.test(_8c4) && !_8ca)) {
_8be(_8c4, _8c5);
}
if (has("mvc-bindings-log-api") && (!_8cf || /^rel:/.test(_8c6) && !_8ca)) {
_8be(_8c6, _8c7);
}
if (!_8ce || !_8cf || (/^rel:/.test(_8c4) || /^rel:/.test(_8c6)) && !_8ca) {
return;
}
if ((!_8ce.set || !_8ce.watch) && _8c5 == "*") {
if (has("mvc-bindings-log-api")) {
_8be(_8c4, _8c5);
}
return;
}
if (_8c5 == null) {
lang.isFunction(_8cf.set) ? _8cf.set(_8c7, _8ce) : (_8cf[_8c7] = _8ce);
if (has("mvc-bindings-log-api")) {
}
} else {
_8c9["Two"] = sync(_8ce, _8c5, _8cf, _8c7, _8c8);
}
}
;
_8cc();
if (_8ca && /^rel:/.test(_8c4) || /^rel:/.test(_8c6) && lang.isFunction(_8ca.set) && lang.isFunction(_8ca.watch)) {
_8c9["rel"] = _8ca.watch(_8cb, function(name, old, _8d0) {
if (old !== _8d0) {
if (has("mvc-bindings-log-api")) {
}
_8cc();
}
});
}
var h = {};
h.unwatch = h.remove = function() {
for (var s in _8c9) {
_8c9[s] && _8c9[s].unwatch();
delete _8c9[s];
}
};
return h;
}
;
var _8d1 = _8b9("dojox/mvc/_atBindingMixin", null, {dataBindAttr: "data-mvc-bindings",_dbpostscript: function(_8d2, _8d3) {
var refs = this._refs = (_8d2 || {}).refs || {};
for (var prop in _8d2) {
if ((_8d2[prop] || {}).atsignature == "dojox.mvc.at") {
var h = _8d2[prop];
delete _8d2[prop];
refs[prop] = h;
}
}
},_startAtWatchHandles: function() {
var refs = this._refs;
if (refs) {
var _8d4 = this._atWatchHandles = this._atWatchHandles || {};
this._excludes = null;
for (var prop in refs) {
if (!refs[prop] || prop == "*") {
continue;
}
_8d4[prop] = bind(refs[prop].target, refs[prop].targetProp, this, prop, {bindDirection: refs[prop].bindDirection,converter: refs[prop].converter});
}
if ((refs["*"] || {}).atsignature == "dojox.mvc.at") {
_8d4["*"] = bind(refs["*"].target, refs["*"].targetProp, this, "*", {bindDirection: refs["*"].bindDirection,converter: refs["*"].converter});
}
}
},_stopAtWatchHandles: function() {
for (var s in this._atWatchHandles) {
this._atWatchHandles[s].unwatch();
delete this._atWatchHandles[s];
}
},_setAtWatchHandle: function(name, _8d5) {
if (name == "ref") {
throw new Error(this + ": 1.7 ref syntax used in conjuction with 1.8 dojox/mvc/at syntax, which is not supported.");
}
var _8d6 = this._atWatchHandles = this._atWatchHandles || {};
if (_8d6[name]) {
_8d6[name].unwatch();
delete _8d6[name];
}
this[name] = null;
this._excludes = null;
if (this._started) {
_8d6[name] = bind(_8d5.target, _8d5.targetProp, this, name, {bindDirection: _8d5.bindDirection,converter: _8d5.converter});
} else {
this._refs[name] = _8d5;
}
},_setBind: function(_8d7) {
var list = eval("({" + _8d7 + "})");
for (var prop in list) {
var h = list[prop];
if ((h || {}).atsignature != "dojox.mvc.at") {
console.warn(prop + " in " + dataBindAttr + " is not a data binding handle.");
} else {
this._setAtWatchHandle(prop, h);
}
}
},_getExcludesAttr: function() {
if (this._excludes) {
return this._excludes;
}
var list = [];
for (var s in this._atWatchHandles) {
if (s != "*") {
list.push(s);
}
}
return list;
},_getPropertiesAttr: function() {
if (this.constructor._attribs) {
return this.constructor._attribs;
}
var list = ["onClick"].concat(this.constructor._setterAttrs);
_8b8.forEach(["id", "excludes", "properties", "ref", "binding"], function(s) {
var _8d8 = _8b8.indexOf(list, s);
if (_8d8 >= 0) {
list.splice(_8d8, 1);
}
});
return this.constructor._attribs = list;
}});
_8d1.prototype[_8d1.prototype.dataBindAttr] = "";
return _8d1;
});
},"dojox/mvc/resolve": function() {
define("dojox/mvc/resolve", ["dojo/_base/lang", "dijit/registry", "dojo/Stateful"], function(lang, _8d9) {
var _8da = function(_8db, _8dc) {
if (typeof _8db == "string") {
var _8dd = _8db.match(/^(expr|rel|widget):(.*)$/) || [];
try {
if (_8dd[1] == "rel") {
_8db = lang.getObject(_8dd[2] || "", false, _8dc);
} else {
if (_8dd[1] == "widget") {
_8db = _8d9.byId(_8dd[2]);
} else {
_8db = lang.getObject(_8dd[2] || _8db, false, _8dc);
}
}
} catch (e) {
}
}
return _8db;
};
return lang.setObject("dojox.mvc.resolve", _8da);
});
},"dojox/mvc/sync": function() {
define("dojox/mvc/sync", ["dojo/_base/lang", "dojo/_base/config", "dojo/_base/array", "dojo/has"], function(lang, _8de, _8df, has) {
var mvc = lang.getObject("dojox.mvc", true);
has.add("mvc-bindings-log-api", (_8de["mvc"] || {}).debugBindings);
var sync;
if (has("mvc-bindings-log-api")) {
function _8e0(_8e1, _8e2, _8e3, _8e4) {
return [[_8e3._setIdAttr || !_8e3.declaredClass ? _8e3 : _8e3.declaredClass, _8e4].join(":"), [_8e1._setIdAttr || !_8e1.declaredClass ? _8e1 : _8e1.declaredClass, _8e2].join(":")];
}
;
}
function _8e5(dst, src) {
return dst === src || typeof dst == "number" && isNaN(dst) && typeof src == "number" && isNaN(src) || lang.isFunction((dst || {}).getTime) && lang.isFunction((src || {}).getTime) && dst.getTime() == src.getTime() || (lang.isFunction((dst || {}).equals) ? dst.equals(src) : lang.isFunction((src || {}).equals) ? src.equals(dst) : false);
}
;
function copy(_8e6, _8e7, _8e8, _8e9, _8ea, _8eb, old, _8ec, _8ed) {
if (sync.equals(_8ec, old) || _8e9 == "*" && _8df.indexOf(_8e8.get("properties") || [_8eb], _8eb) < 0 || _8e9 == "*" && _8eb in (_8ed || {})) {
return;
}
var prop = _8e9 == "*" ? _8eb : _8e9;
if (has("mvc-bindings-log-api")) {
var _8ee = _8e0(_8e8, prop, _8ea, _8eb);
}
try {
_8ec = _8e6 ? _8e6(_8ec, _8e7) : _8ec;
} catch (e) {
if (has("mvc-bindings-log-api")) {
}
return;
}
if (has("mvc-bindings-log-api")) {
}
lang.isFunction(_8e8.set) ? _8e8.set(prop, _8ec) : (_8e8[prop] = _8ec);
}
;
var _8ef = {from: 1,to: 2,both: 3}, _8f0;
sync = function(_8f1, _8f2, _8f3, _8f4, _8f5) {
var _8f6 = (_8f5 || {}).converter, _8f7, _8f8, _8f9;
if (_8f6) {
_8f7 = {source: _8f1,target: _8f3};
_8f8 = _8f6.format && lang.hitch(_8f7, _8f6.format);
_8f9 = _8f6.parse && lang.hitch(_8f7, _8f6.parse);
}
var _8fa = [], _8fb = [], list, _8fc = lang.mixin({}, _8f1.constraints, _8f3.constraints), _8fd = (_8f5 || {}).bindDirection || mvc.both;
if (has("mvc-bindings-log-api")) {
var _8fe = _8e0(_8f1, _8f2, _8f3, _8f4);
}
if (_8f4 == "*") {
if (_8f2 != "*") {
throw new Error("Unmatched wildcard is specified between source and target.");
}
list = _8f3.get("properties");
if (!list) {
list = [];
for (var s in _8f3) {
if (_8f3.hasOwnProperty(s) && s != "_watchCallbacks") {
list.push(s);
}
}
}
_8fb = _8f3.get("excludes");
} else {
list = [_8f2];
}
if (_8fd & mvc.from) {
if (lang.isFunction(_8f1.set) && lang.isFunction(_8f1.watch)) {
_8fa.push(_8f1.watch.apply(_8f1, ((_8f2 != "*") ? [_8f2] : []).concat([function(name, old, _8ff) {
copy(_8f8, _8fc, _8f3, _8f4, _8f1, name, old, _8ff, _8fb);
}])));
} else {
if (has("mvc-bindings-log-api")) {
}
}
_8df.forEach(list, function(prop) {
if (_8f4 != "*" || !(prop in (_8fb || {}))) {
var _900 = lang.isFunction(_8f1.get) ? _8f1.get(prop) : _8f1[prop];
copy(_8f8, _8fc, _8f3, _8f4 == "*" ? prop : _8f4, _8f1, prop, _8f0, _900);
}
});
}
if (_8fd & mvc.to) {
if (!(_8fd & mvc.from)) {
_8df.forEach(list, function(prop) {
if (_8f4 != "*" || !(prop in (_8fb || {}))) {
var _901 = lang.isFunction(_8f3.get) ? _8f3.get(_8f4) : _8f3[_8f4];
copy(_8f9, _8fc, _8f1, prop, _8f3, _8f4 == "*" ? prop : _8f4, _8f0, _901);
}
});
}
if (lang.isFunction(_8f3.set) && lang.isFunction(_8f3.watch)) {
_8fa.push(_8f3.watch.apply(_8f3, ((_8f4 != "*") ? [_8f4] : []).concat([function(name, old, _902) {
copy(_8f9, _8fc, _8f1, _8f2, _8f3, name, old, _902, _8fb);
}])));
} else {
if (has("mvc-bindings-log-api")) {
}
}
}
if (has("mvc-bindings-log-api")) {
}
var _903 = {};
_903.unwatch = _903.remove = function() {
for (var h = null; h = _8fa.pop(); ) {
h.unwatch();
if (has("mvc-bindings-log-api")) {
}
}
};
return _903;
};
lang.mixin(mvc, _8ef);
return lang.setObject("dojox.mvc.sync", lang.mixin(sync, {equals: _8e5}, _8ef));
});
},"dojox/mvc/StoreRefController": function() {
define("dojox/mvc/StoreRefController", ["dojo/_base/declare", "dojo/_base/lang", "dojo/when", "./getStateful", "./ModelRefController"], function(_904, lang, when, _905, _906) {
return _904("dojox.mvc.StoreRefController", _906, {store: null,getStatefulOptions: null,_refSourceModelProp: "model",queryStore: function(_907, _908) {
if (!(this.store || {}).query) {
return;
}
if (this._queryObserveHandle) {
this._queryObserveHandle.cancel();
}
var _909 = this, _90a = this.store.query(_907, _908), _90b = when(_90a, function(_90c) {
if (_909._beingDestroyed) {
return;
}
_90c = _905(_90c, _909.getStatefulOptions);
_909.set(_909._refSourceModelProp, _90c);
return _90c;
});
for (var s in _90a) {
if (isNaN(s) && _90a.hasOwnProperty(s) && lang.isFunction(_90a[s])) {
_90b[s] = _90a[s];
}
}
return _90b;
},getStore: function(id, _90d) {
if (!(this.store || {}).get) {
return;
}
if (this._queryObserveHandle) {
this._queryObserveHandle.cancel();
}
var _90e = this;
result = when(this.store.get(id, _90d), function(_90f) {
if (_90e._beingDestroyed) {
return;
}
_90f = _905(_90f, _90e.getStatefulOptions);
_90e.set(_90e._refSourceModelProp, _90f);
return _90f;
});
return result;
},putStore: function(_910, _911) {
if (!(this.store || {}).put) {
return;
}
return this.store.put(_910, _911);
},addStore: function(_912, _913) {
if (!(this.store || {}).add) {
return;
}
return this.store.add(_912, _913);
},removeStore: function(id, _914) {
if (!(this.store || {}).remove) {
return;
}
return this.store.remove(id, _914);
}});
});
},"dojox/mvc/ListController": function() {
define("dojox/mvc/ListController", ["dojo/_base/array", "dojo/_base/lang", "dojo/_base/declare", "./ModelRefController"], function(_915, lang, _916, _917) {
function _918(c) {
for (var s in {"_listModelWatchHandle": 1,"_tableModelWatchHandle": 1}) {
if (c[s]) {
c[s].unwatch();
c[s] = null;
}
}
}
;
function _919(ctrl, old, _91a) {
_918(ctrl);
if (_91a && old !== _91a) {
if (_91a.watchElements) {
ctrl._listModelWatchHandle = _91a.watchElements(function(idx, _91b, adds) {
if (_91b && adds) {
var _91c = ctrl.get("cursorIndex");
if (_91b && _91c >= idx && _91c < idx + _91b.length) {
ctrl.set("cursorIndex", -1);
return;
}
if ((_91b.length || adds.length) && _91c >= idx) {
ctrl.set(ctrl._refCursorProp, ctrl.get("cursor"));
}
} else {
ctrl.set(ctrl._refCursorProp, ctrl.get(ctrl._refCursorProp));
}
});
} else {
if (_91a.set && _91a.watch) {
if (ctrl.get("cursorIndex") < 0) {
ctrl._set("cursorIndex", "");
}
ctrl._tableModelWatchHandle = _91a.watch(function(name, old, _91d) {
if (old !== _91d && name == ctrl.get("cursorIndex")) {
ctrl.set(ctrl._refCursorProp, _91d);
}
});
}
}
}
ctrl._setCursorIndexAttr(ctrl.cursorIndex);
}
;
function _91e(ctrl, old, _91f) {
var _920 = ctrl[ctrl._refInModelProp];
if (!_920) {
return;
}
if (old !== _91f) {
if (lang.isArray(_920)) {
var _921 = _915.indexOf(_920, _91f);
if (_921 < 0) {
var _922 = ctrl.get("cursorIndex");
if (_922 >= 0 && _922 < _920.length) {
_920.set(_922, _91f);
}
} else {
ctrl.set("cursorIndex", _921);
}
} else {
for (var s in _920) {
if (_920[s] == _91f) {
ctrl.set("cursorIndex", s);
return;
}
}
var _922 = ctrl.get("cursorIndex");
if (_922) {
_920.set(_922, _91f);
}
}
}
}
;
return _916("dojox.mvc.ListController", _917, {idProperty: "uniqueId",cursorId: null,cursorIndex: -1,cursor: null,model: null,_listModelWatchHandle: null,_tableModelWatchHandle: null,_refCursorProp: "cursor",_refModelProp: "cursor",destroy: function() {
_918(this);
this.inherited(arguments);
},set: function(name, _923) {
var _924 = this[this._refCursorProp];
var _925 = this[this._refInModelProp];
this.inherited(arguments);
if (name == this._refCursorProp) {
_91e(this, _924, _923);
}
if (name == this._refInModelProp) {
_919(this, _925, _923);
}
},_setCursorIdAttr: function(_926) {
var old = this.cursorId;
this._set("cursorId", _926);
var _927 = this[this._refInModelProp];
if (!_927) {
return;
}
if (old !== _926) {
if (lang.isArray(_927)) {
for (var i = 0; i < _927.length; i++) {
if (_927[i][this.idProperty] == _926) {
this.set("cursorIndex", i);
return;
}
}
this._set("cursorIndex", -1);
} else {
for (var s in _927) {
if (_927[s][this.idProperty] == _926) {
this.set("cursorIndex", s);
return;
}
}
this._set("cursorIndex", "");
}
}
},_setCursorIndexAttr: function(_928) {
this._set("cursorIndex", _928);
if (!this[this._refInModelProp]) {
return;
}
this.set(this._refCursorProp, this[this._refInModelProp][_928]);
this.set("cursorId", this[this._refInModelProp][_928] && this[this._refInModelProp][_928][this.idProperty]);
},hasControllerProperty: function(name) {
return this.inherited(arguments) || name == this._refCursorProp;
}});
});
},"dojox/mvc/Repeat": function() {
define("dojox/mvc/Repeat", ["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/dom", "dojo/dom-construct", "dojo/_base/array", "dojo/query", "dojo/when", "dijit/registry", "./_Container"], function(_929, lang, has, win, dom, _92a, _92b, _92c, when, _92d, _92e) {
return _929("dojox.mvc.Repeat", _92e, {index: 0,useParent: "",removeRepeatNode: false,children: null,_relTargetProp: "children",startup: function() {
if (this.removeRepeatNode) {
var _92f = null;
if (lang.isFunction(this.getParent)) {
if (this.getParent()) {
this.select = this.getParent().select;
this.onCheckStateChanged = this.getParent().onCheckStateChanged;
}
}
}
this.inherited(arguments);
this._setChildrenAttr(this.children);
},postscript: function(_930, _931) {
if (this.useParent && dom.byId(this.useParent)) {
this.srcNodeRef = dom.byId(this.useParent);
} else {
this.srcNodeRef = dom.byId(_931);
}
if (this.srcNodeRef) {
var prop = this._attachTemplateNodes ? "inlineTemplateString" : "templateString";
if (this[prop] == "") {
this[prop] = this.srcNodeRef.innerHTML;
}
try {
this.srcNodeRef.innerHTML = "";
} catch (e) {
while (this.srcNodeRef.firstChild) {
this.srcNodeRef.removeChild(this.srcNodeRef.firstChild);
}
}
}
this.inherited(arguments);
},_setChildrenAttr: function(_932) {
var _933 = this.children;
this._set("children", _932);
if (this.binding != _932) {
this.set("ref", _932);
}
if (this._started && (!this._builtOnce || _933 != _932)) {
this._builtOnce = true;
this._buildContained(_932);
}
},_buildContained: function(_934) {
if (!_934) {
return;
}
if (this.useParent && dom.byId(this.useParent)) {
this.srcNodeRef = dom.byId(this.useParent);
}
this._destroyBody();
this._updateAddRemoveWatch(_934);
var _935 = [], prop = this._attachTemplateNodes ? "inlineTemplateString" : "templateString";
for (this.index = 0; lang.isFunction(_934.get) ? _934.get(this.index) : _934[this.index]; this.index++) {
_935.push(this._exprRepl(this[prop]));
}
var _936 = this.containerNode || this.srcNodeRef || this.domNode;
if (has("ie") && /^(table|tbody)$/i.test(_936.tagName)) {
var div = win.doc.createElement("div");
div.innerHTML = "
<table>
    <tbody>" + _935.join("") + "</tbody>
</table>";
for (var _937 = div.getElementsByTagName("tbody")[0]; _937.firstChild; ) {
_936.appendChild(_937.firstChild);
}
} else {
if (has("ie") && /^td$/i.test(_936.tagName)) {
var div = win.doc.createElement("div");
div.innerHTML = "
<table>
    <tbody>
    <tr>" + _935.join("") + "</tr>
    </tbody>
</table>";
for (var tr = div.getElementsByTagName("tr")[0]; tr.firstChild; ) {
_936.appendChild(tr.firstChild);
}
} else {
_936.innerHTML = _935.join("");
}
}
this.srcNodeRef = _936;
var _938 = this;
when(this._createBody(), function() {
if (!_938.removeRepeatNode) {
return;
}
var _939 = _938.domNode;
if (!_938.savedParentId && _938.domNode.parentNode && _938.domNode.parentNode.id) {
_938.savedParentId = _938.domNode.parentNode.id;
}
var _93a = dom.byId(_938.savedParentId);
if (_939 && _939.children) {
var t3 = _92d.findWidgets(_939);
var _93b = t3.length;
for (var j = _93b; j > 0; j--) {
if (t3[j - 1].declaredClass == "dojox.mvc.Group") {
var cnt = _939.children[j - 1].children.length;
var _93c = _92d.byId(_93a.id).select;
for (var i = cnt; i > 0; i--) {
_92d.byId(_939.children[j - 1].id).select = _93c;
_92a.place(_939.children[j - 1].removeChild(_939.children[j - 1].children[i - 1]), _93a, "first");
}
} else {
_92a.place(_939.removeChild(_939.children[j - 1]), _93a, "first");
}
}
_92a.destroy(_939);
}
});
},_updateAddRemoveWatch: function(_93d) {
if (this._addRemoveWatch) {
this._addRemoveWatch.unwatch();
}
var _93e = this;
this._addRemoveWatch = lang.isFunction(_93d.watchElements) && _93d.watchElements(function(idx, _93f, adds) {
if (!_93f || !adds || _93f.length || adds.length) {
_93e._buildContained(_93e.children);
}
});
}});
});
},"dojox/mvc/_Container": function() {
define("dojox/mvc/_Container", ["dojo/_base/declare", "dojo/_base/lang", "dojo/when", "dijit/_WidgetBase", "dojo/regexp"], function(_940, lang, when, _941, _942) {
return _940("dojox.mvc._Container", _941, {stopParser: true,exprchar: "$",templateString: "",inlineTemplateString: "",_containedWidgets: [],_parser: null,_createBody: function() {
if (!this._parser) {
try {
this._parser = require("dojo/parser");
} catch (e) {
try {
this._parser = require("dojox/mobile/parser");
} catch (e) {
console.error("Add explicit require(['dojo/parser']) or explicit require(['dojox/mobile/parser']), one of the parsers is required!");
}
}
}
var _943 = this;
if (this._parser) {
return when(this._parser.parse(this.srcNodeRef, {template: true,inherited: {dir: this.dir,lang: this.lang},propsThis: this,scope: "dojo"}), function(_944) {
_943._containedWidgets = _944;
});
}
},_destroyBody: function() {
if (this._containedWidgets && this._containedWidgets.length > 0) {
for (var n = this._containedWidgets.length - 1; n > -1; n--) {
var w = this._containedWidgets[n];
if (w && !w._destroyed && w.destroy) {
w.destroy();
}
}
}
},_exprRepl: function(tmpl) {
var _945 = this, _946 = function(_947, key) {
if (!_947) {
return "";
}
var exp = _947.substr(2);
exp = exp.substr(0, exp.length - 1);
with (_945) {
return eval(exp);
}
};
_946 = lang.hitch(this, _946);
return tmpl.replace(new RegExp(_942.escapeString(this.exprchar) + "({.*?})", "g"), function(_948, key, _949) {
return _946(_948, key).toString();
});
}});
});
},"dojox/mvc/Group": function() {
define("dojox/mvc/Group", ["dojo/_base/declare", "dijit/_WidgetBase", "dojo/_base/lang"], function(_94a, _94b, lang) {
return _94a("dojox.mvc.Group", _94b, {target: null,startup: function() {
var _94c = null;
if (lang.isFunction(this.getParent)) {
if (this.getParent() && this.getParent().removeRepeatNode) {
this.select = this.getParent().select;
this.onCheckStateChanged = this.getParent().onCheckStateChanged;
}
}
this.inherited(arguments);
},_setTargetAttr: function(_94d) {
this._set("target", _94d);
if (this.binding != _94d) {
this.set("ref", _94d);
}
}});
});
},"dojox/mvc/WidgetList": function() {
define("dojox/mvc/WidgetList", ["require", "dojo/_base/array", "dojo/_base/lang", "dojo/_base/declare", "dijit/_Container", "dijit/_WidgetBase", "dojox/mvc/Templated"], function(_94e, _94f, lang, _950, _951, _952, _953) {
var _954 = "data-mvc-child-type", _955 = "data-mvc-child-mixins", _956 = "data-mvc-child-props", _957 = "data-mvc-child-bindings", _958;
function _959(_95a) {
return eval("({" + _95a + "})");
}
;
function _95b(w) {
for (var h = null; h = (w._handles || []).pop(); ) {
h.unwatch();
}
}
;
var _95c = _950("dojox.mvc.WidgetList", [_952, _951], {childClz: null,childType: "",childMixins: "",childParams: null,childBindings: null,children: null,templateString: "",partialRebuild: false,_relTargetProp: "children",postMixInProperties: function() {
this.inherited(arguments);
if (this[_954]) {
this.childType = this[_954];
}
if (this[_955]) {
this.childMixins = this[_955];
}
},startup: function() {
this.inherited(arguments);
this._setChildrenAttr(this.children);
},_setChildrenAttr: function(_95d) {
var _95e = this.children;
this._set("children", _95d);
if (this._started && (!this._builtOnce || _95e != _95d)) {
_95b(this);
this._builtOnce = true;
this._buildChildren(_95d);
if (lang.isArray(_95d)) {
var _95f = this;
!this.partialRebuild && lang.isFunction(_95d.watchElements) && (this._handles = this._handles || []).push(_95d.watchElements(function(idx, _960, adds) {
_95f._buildChildren(_95d);
}));
_95d.watch !== {}.watch && (this._handles = this._handles || []).push(_95d.watch(function(name, old, _961) {
if (!isNaN(name)) {
var w = _95f.getChildren()[name - 0];
w && w.set(w._relTargetProp || "target", _961);
}
}));
}
}
},_buildChildren: function(_962) {
for (var cw = this.getChildren(), w = null; w = cw.pop(); ) {
this.removeChild(w);
w.destroy();
}
if (!lang.isArray(_962)) {
return;
}
var _963 = lang.hitch(this, function(seq) {
if (this._buildChildrenSeq > seq) {
return;
}
var clz = _950([].slice.call(arguments, 1), {}), _964 = this;
function _965(_966, _967) {
_94f.forEach(_94f.map(_966, function(_968, idx) {
var _969 = {ownerDocument: _964.ownerDocument,parent: _964,indexAtStartup: _967 + idx};
_969[(_964.childParams || _964[_956] && _959.call(_969, _964[_956]) || {})._relTargetProp || clz.prototype._relTargetProp || "target"] = _968;
var _96a = _964.childParams || _964[_956] && _959.call(_969, _964[_956]), _96b = _964.childBindings || _964[_957] && _959.call(_969, _964[_957]);
if (_964.templateString && !_969.templateString && !clz.prototype.templateString) {
_969.templateString = _964.templateString;
}
if (_96b && !_969.bindings && !clz.prototype.bindings) {
_969.bindings = _96b;
}
return new clz(lang.mixin(_969, _96a));
}), function(_96c, idx) {
_964.addChild(_96c, _967 + idx);
});
}
;
_965(_962, 0);
if (this.partialRebuild) {
lang.isFunction(_962.watchElements) && (this._handles = this._handles || []).push(_962.watchElements(function(idx, _96d, adds) {
for (var i = 0, l = (_96d || []).length; i < l; ++i) {
_964.removeChild(idx);
}
_965(adds, idx);
}));
}
}, this._buildChildrenSeq = (this._buildChildrenSeq || 0) + 1);
if (this.childClz) {
_963(this.childClz);
} else {
if (this.childType) {
var _96e = [this.childType].concat(this.childMixins && this.childMixins.split(",") || []), mids = _94f.filter(_94f.map(_96e, function(type) {
return lang.getObject(type) ? _958 : type;
}), function(mid) {
return mid !== _958;
}), _96f = this;
_94e(mids, function() {
if (!_96f._beingDestroyed) {
_963.apply(this, _94f.map(_96e, function(type) {
return lang.getObject(type) || _94e(type);
}));
}
});
} else {
_963(_953);
}
}
},destroy: function() {
_95b(this);
this.inherited(arguments);
}});
_95c.prototype[_954] = _95c.prototype[_955] = _95c.prototype[_956] = _95c.prototype[_957] = "";
return _95c;
});
},"dojox/mvc/Templated": function() {
define("dojox/mvc/Templated", ["dojo/_base/declare", "dojo/_base/lang", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", "dojox/mvc/at"], function(_970, lang, _971, _972, _973, at) {
return _970("dojox.mvc.Templated", [_971, _972, _973], {bindings: null,startup: function() {
this.inherited(arguments);
for (var s in this.bindings) {
var w = this[s], _974 = this.bindings[s];
if (w) {
for (var prop in _974) {
w.set(prop, _974[prop]);
}
}
}
}});
});
},"dojox/mvc/at": function() {
define("dojox/mvc/at", ["dojo/_base/kernel", "dojo/_base/lang", "./sync", "./_atBindingExtension"], function(_975, lang, sync) {
_975.experimental("dojox.mvc");
var at = function(_976, _977) {
return {atsignature: "dojox.mvc.at",target: _976,targetProp: _977,bindDirection: sync.both,direction: function(_978) {
this.bindDirection = _978;
return this;
},transform: function(_979) {
this.converter = _979;
return this;
}};
};
at.from = sync.from;
at.to = sync.to;
at.both = sync.both;
return lang.setObject("dojox.mvc.at", at);
});
},"dojox/mvc/_atBindingExtension": function() {
define("dojox/mvc/_atBindingExtension", ["dojo/aspect", "dojo/_base/lang", "dijit/_WidgetBase", "./_atBindingMixin", "dijit/registry"], function(_97a, lang, _97b, _97c) {
lang.extend(_97b, _97c.prototype);
_97a.before(_97b.prototype, "postscript", function(_97d, _97e) {
this._dbpostscript(_97d, _97e);
});
_97a.before(_97b.prototype, "startup", function() {
this._startAtWatchHandles();
});
_97a.before(_97b.prototype, "destroy", function() {
this._stopAtWatchHandles();
});
_97a.around(_97b.prototype, "set", function(_97f) {
return function(name, _980) {
if (name == _97c.prototype.dataBindAttr) {
return this._setBind(_980);
} else {
if ((_980 || {}).atsignature == "dojox.mvc.at") {
return this._setAtWatchHandle(name, _980);
}
}
return _97f.apply(this, lang._toArray(arguments));
};
});
});
},"dojox/mvc/Output": function() {
define("dojox/mvc/Output", ["dojo/_base/declare", "dojo/_base/lang", "dojo/dom", "dijit/_WidgetBase", "dojo/regexp"], function(_981, lang, dom, _982, _983) {
return _981("dojox.mvc.Output", _982, {exprchar: "$",templateString: "",postscript: function(_984, _985) {
this.srcNodeRef = dom.byId(_985);
if (this.srcNodeRef) {
this.templateString = this.srcNodeRef.innerHTML;
this.srcNodeRef.innerHTML = "";
}
this.inherited(arguments);
},set: function(name, _986) {
this.inherited(arguments);
if (name === "value") {
this._output();
}
},_updateBinding: function(name, old, _987) {
this.inherited(arguments);
this._output();
},_output: function() {
var _988 = this.srcNodeRef || this.domNode;
_988.innerHTML = this.templateString ? this._exprRepl(this.templateString) : this.value;
},_exprRepl: function(tmpl) {
var _989 = this, _98a = function(_98b, key) {
if (!_98b) {
return "";
}
var exp = _98b.substr(2);
exp = exp.substr(0, exp.length - 1);
with (_989) {
var val = eval(exp);
return (val || val == 0 ? val : "");
}
};
_98a = lang.hitch(this, _98a);
return tmpl.replace(new RegExp(_983.escapeString(this.exprchar) + "({.*?})", "g"), function(_98c, key, _98d) {
return _98a(_98c, key).toString();
});
}});
});
},"*now": function(r) {
r(["dojo/i18n!*preload*demos/todoApp/nls/src*[\"ar\",\"ca\",\"cs\",\"da\",\"de\",\"el\",\"en-gb\",\"en-us\",\"es-es\",\"fi-fi\",\"fr-fr\",\"he-il\",\"hu\",\"it-it\",\"ja-jp\",\"ko-kr\",\"nl-nl\",\"nb\",\"pl\",\"pt-br\",\"pt-pt\",\"ru\",\"sk\",\"sl\",\"sv\",\"th\",\"tr\",\"zh-tw\",\"zh-cn\",\"ROOT\"]"]);
}}});
require(["dojox/app/main", "dojox/json/ref"], function(_98e, json) {
var _98f = false;
var _990 = "./config-phone.json";
if (window.innerWidth > 600) {
_990 = "./config-tablet.json";
_98f = true;
}
require(["dojo/text!" + _990], function(_991) {
var _992 = json.fromJson(_991);
_992.isTablet = _98f;
_98e(_992);
});
});
